Class AbstractXmlReadHandler
java.lang.Object
org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler
- All Implemented Interfaces:
XmlReadHandler
- Direct Known Subclasses:
IgnoreAnyChildReadHandler, PropertiesReadHandler, StringReadHandler
A base class for implementing an
XmlReadHandler.
This class takes care of all the delegation management.-
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) This method is called to process the character data between element tags.final voidendElement(String uri, String tagName) This method is called at the end of an element.Returns the locator as provided by the XML parser.Returns the root handler for the parsing.Returns the tag name.getUri()Returns the uri of the element.voidinit(RootXmlReadHandler rootHandler, String uri, String tagName) Initialises the handler.final voidstartElement(String uri, String tagName, Attributes attrs) This method is called at the start of an element.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface XmlReadHandler
getObject
-
Method Details
-
init
Initialises the handler.- Specified by:
initin interfaceXmlReadHandler- Parameters:
rootHandler- the root handler.uri- the namespace uri.tagName- the tag name.
-
startElement
This method is called at the start of an element.- Specified by:
startElementin interfaceXmlReadHandler- Parameters:
uri- the namespace uri.tagName- the tag name.attrs- the attributes.- Throws:
SAXException- if there is a parsing error.
-
characters
This method is called to process the character data between element tags.- Specified by:
charactersin interfaceXmlReadHandler- Parameters:
ch- the character buffer.start- the start index.length- the length.- Throws:
SAXException- if there is a parsing error.
-
endElement
This method is called at the end of an element.- Specified by:
endElementin interfaceXmlReadHandler- Parameters:
uri- the namespace uri.tagName- the tag name.- Throws:
SAXException- if there is a parsing error.
-
getTagName
-
getUri
Returns the uri of the element. The URI identifies the namespace.- Returns:
- the element's URI.
-
getRootHandler
Returns the root handler for the parsing.- Returns:
- the root handler.
-
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.
-