Class AbstractXmlReadHandler

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void characters​(char[] ch, int start, int length)
      This method is called to process the character data between element tags.
      void endElement​(java.lang.String uri, java.lang.String tagName)
      This method is called at the end of an element.
      org.xml.sax.Locator getLocator()
      Returns the locator as provided by the XML parser.
      RootXmlReadHandler getRootHandler()
      Returns the root handler for the parsing.
      java.lang.String getTagName()
      Returns the tag name.
      java.lang.String getUri()
      Returns the uri of the element.
      void init​(RootXmlReadHandler rootHandler, java.lang.String uri, java.lang.String tagName)
      Initialises the handler.
      void startElement​(java.lang.String uri, java.lang.String tagName, org.xml.sax.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
    • Method Detail

      • init

        public void init​(RootXmlReadHandler rootHandler,
                         java.lang.String uri,
                         java.lang.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​(java.lang.String uri,
                                       java.lang.String tagName,
                                       org.xml.sax.Attributes attrs)
                                throws org.xml.sax.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:
        org.xml.sax.SAXException - if there is a parsing error.
      • characters

        public void characters​(char[] ch,
                               int start,
                               int length)
                        throws org.xml.sax.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:
        org.xml.sax.SAXException - if there is a parsing error.
      • endElement

        public final void endElement​(java.lang.String uri,
                                     java.lang.String tagName)
                              throws org.xml.sax.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:
        org.xml.sax.SAXException - if there is a parsing error.
      • getTagName

        public java.lang.String getTagName()
        Returns the tag name.
        Returns:
        the tag name.
      • getUri

        public java.lang.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 org.xml.sax.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.