Class AbstractXmlReadHandler

java.lang.Object
org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler
All Implemented Interfaces:
XmlReadHandler
Direct Known Subclasses:
IgnoreAnyChildReadHandler, PropertiesReadHandler, StringReadHandler

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 Details

    • init

      public void init(RootXmlReadHandler rootHandler, String uri, String tagName)
      Initialises the handler.
      Specified by:
      init in interface XmlReadHandler
      Parameters:
      rootHandler - the root handler.
      tagName - the tag name.
      uri - the namespace uri.
    • startElement

      public final void startElement(String uri, String tagName, Attributes attrs) throws SAXException
      This method is called at the start of an element.
      Specified by:
      startElement in interface XmlReadHandler
      Parameters:
      tagName - the tag name.
      attrs - the attributes.
      uri - the namespace uri.
      Throws:
      SAXException - if there is a parsing error.
    • characters

      public void characters(char[] ch, int start, int length) throws SAXException
      This method is called to process the character data between element tags.
      Specified by:
      characters in interface XmlReadHandler
      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) throws SAXException
      This method is called at the end of an element.
      Specified by:
      endElement in interface XmlReadHandler
      Parameters:
      tagName - the tag name.
      uri - the namespace uri.
      Throws:
      SAXException - if there is a parsing error.
    • 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.
    • getRootHandler

      public RootXmlReadHandler getRootHandler()
      Returns the root handler for the parsing.
      Returns:
      the root handler.
    • 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.