org.pentaho.reporting.libraries.xmlns.parser

Class AbstractXmlReadHandler

public abstract class AbstractXmlReadHandler extends Object implements XmlReadHandler

A base class for implementing an XmlReadHandler. This class takes care of all the delegation management.
Method Summary
voidcharacters(char[] ch, int start, int length)
This method is called to process the character data between element tags.
voidendElement(String uri, String tagName)
This method is called at the end of an element.
LocatorgetLocator()
Returns the locator as provided by the XML parser.
RootXmlReadHandlergetRootHandler()
Returns the root handler for the parsing.
StringgetTagName()
Returns the tag name.
StringgetUri()
Returns the uri of the element.
voidinit(RootXmlReadHandler rootHandler, String uri, String tagName)
Initialises the handler.
voidstartElement(String uri, String tagName, Attributes attrs)
This method is called at the start of an element.

Method Detail

characters

public void characters(char[] ch, int start, int length)
This method is called to process the character data between element tags.

Parameters: ch the character buffer. start the start index. length the length.

Throws: SAXException if there is a parsing error.

endElement

public final void endElement(String uri, String tagName)
This method is called at the end of an element.

Parameters: tagName the tag name.

Throws: SAXException if there is a parsing error.

getLocator

public Locator getLocator()
Returns the locator as provided by the XML parser. This method may return null if the XML parser has no locator support.

Returns: the locator or null.

getRootHandler

public RootXmlReadHandler getRootHandler()
Returns the root handler for the parsing.

Returns: the root handler.

getTagName

public String getTagName()
Returns the tag name.

Returns: the tag name.

getUri

public String getUri()
Returns the uri of the element. The URI identifies the namespace.

Returns: the element's URI.

init

public void init(RootXmlReadHandler rootHandler, String uri, String tagName)
Initialises the handler.

Parameters: rootHandler the root handler. tagName the tag name.

startElement

public final void startElement(String uri, String tagName, Attributes attrs)
This method is called at the start of an element.

Parameters: tagName the tag name. attrs the attributes.

Throws: SAXException if there is a parsing error.