nu.validator.saxtree
Class TreeParser
java.lang.Object
nu.validator.saxtree.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 |
TreeParser(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ext.LexicalHandler lexicalHandler)
The constructor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeParser
public TreeParser(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ext.LexicalHandler lexicalHandler)
- The constructor.
- Parameters:
contentHandler - must not be nulllexicalHandler - may be null
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()