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 TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) This method is called to process the character data between element tags.final void
endElement
(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.void
init
(RootXmlReadHandler rootHandler, String uri, String tagName) Initialises the handler.final void
startElement
(String uri, String tagName, Attributes attrs) This method is called at the start of an element.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler
getObject
-
Method Details
-
init
Initialises the handler.- Specified by:
init
in interfaceXmlReadHandler
- Parameters:
rootHandler
- the root handler.tagName
- the tag name.uri
- the namespace uri.
-
startElement
This method is called at the start of an element.- Specified by:
startElement
in interfaceXmlReadHandler
- Parameters:
tagName
- the tag name.attrs
- the attributes.uri
- the namespace uri.- Throws:
SAXException
- if there is a parsing error.
-
characters
This method is called to process the character data between element tags.- Specified by:
characters
in 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:
endElement
in interfaceXmlReadHandler
- Parameters:
tagName
- the tag name.uri
- the namespace uri.- Throws:
SAXException
- if there is a parsing error.
-
getTagName
Returns the tag name.- Returns:
- the tag name.
-
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.
-