Class TreeParser

  • All Implemented Interfaces:
    org.xml.sax.Locator

    public final class TreeParser
    extends java.lang.Object
    implements org.xml.sax.Locator
    A tree visitor that replays a tree as SAX events.
    Version:
    $Id$
    Author:
    hsivonen
    • Constructor Summary

      Constructors 
      Constructor Description
      TreeParser​(org.xml.sax.ContentHandler contentHandler, org.xml.sax.ext.LexicalHandler lexicalHandler)
      The constructor.
    • Constructor Detail

      • TreeParser

        public TreeParser​(org.xml.sax.ContentHandler contentHandler,
                          org.xml.sax.ext.LexicalHandler lexicalHandler)
        The constructor.
        Parameters:
        contentHandler - must not be null
        lexicalHandler - may be null
    • Method Detail

      • parse

        public void parse​(Node node)
                   throws org.xml.sax.SAXException
        Causes SAX events for the tree rooted at the argument to be emitted. startDocument() and endDocument() are only emitted for a Document node.
        Parameters:
        node - the root
        Throws:
        org.xml.sax.SAXException
      • getColumnNumber

        public int getColumnNumber()
        Specified by:
        getColumnNumber in interface org.xml.sax.Locator
        See Also:
        Locator.getColumnNumber()
      • getLineNumber

        public int getLineNumber()
        Specified by:
        getLineNumber in interface org.xml.sax.Locator
        See Also:
        Locator.getLineNumber()
      • getPublicId

        public java.lang.String getPublicId()
        Specified by:
        getPublicId in interface org.xml.sax.Locator
        See Also:
        Locator.getPublicId()
      • getSystemId

        public java.lang.String getSystemId()
        Specified by:
        getSystemId in interface org.xml.sax.Locator
        See Also:
        Locator.getSystemId()