Package nu.validator.saxtree
Class TreeParser
java.lang.Object
nu.validator.saxtree.TreeParser
- All Implemented Interfaces:
Locator
A tree visitor that replays a tree as SAX events.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ContentHandler
The content handler.private final LexicalHandler
The lexical handler.private Locator
The current locator. -
Constructor Summary
ConstructorsConstructorDescriptionTreeParser
(ContentHandler contentHandler, LexicalHandler lexicalHandler) The constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) void
characters
(char[] ch, int start, int length, Locator locator) (package private) void
(package private) void
(package private) void
endDocument
(Locator locator) (package private) void
(package private) void
endElement
(String uri, String localName, String qName, Locator locator) (package private) void
(package private) void
endPrefixMapping
(String prefix, Locator locator) int
int
(package private) void
ignorableWhitespace
(char[] ch, int start, int length, Locator locator) void
Causes SAX events for the tree rooted at the argument to be emitted.(package private) void
processingInstruction
(String target, String data, Locator locator) (package private) void
skippedEntity
(String name, Locator locator) (package private) void
startCDATA
(Locator locator) (package private) void
startDocument
(Locator locator) (package private) void
(package private) void
startElement
(String uri, String localName, String qName, Attributes atts, Locator locator) (package private) void
startEntity
(String name, Locator locator) (package private) void
startPrefixMapping
(String prefix, String uri, Locator locator)
-
Field Details
-
contentHandler
The content handler. -
lexicalHandler
The lexical handler. -
locatorDelegate
The current locator.
-
-
Constructor Details
-
TreeParser
The constructor.- Parameters:
contentHandler
- must not benull
lexicalHandler
- may benull
-
-
Method Details
-
parse
Causes SAX events for the tree rooted at the argument to be emitted.startDocument()
andendDocument()
are only emitted for aDocument
node.- Parameters:
node
- the root- Throws:
SAXException
-
characters
- Throws:
SAXException
- See Also:
-
endDocument
- Throws:
SAXException
- See Also:
-
endElement
- Throws:
SAXException
- See Also:
-
endPrefixMapping
- Throws:
SAXException
- See Also:
-
ignorableWhitespace
- Throws:
SAXException
- See Also:
-
processingInstruction
- Throws:
SAXException
- See Also:
-
skippedEntity
- Throws:
SAXException
- See Also:
-
startDocument
- Throws:
SAXException
- See Also:
-
startElement
void startElement(String uri, String localName, String qName, Attributes atts, Locator locator) throws SAXException - Throws:
SAXException
- See Also:
-
startPrefixMapping
- Throws:
SAXException
- See Also:
-
comment
- Throws:
SAXException
- See Also:
-
endCDATA
- Throws:
SAXException
- See Also:
-
endDTD
- Throws:
SAXException
- See Also:
-
endEntity
- Throws:
SAXException
- See Also:
-
startCDATA
- Throws:
SAXException
- See Also:
-
startDTD
- Throws:
SAXException
- See Also:
-
startEntity
- Throws:
SAXException
- See Also:
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumber
in interfaceLocator
- See Also:
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumber
in interfaceLocator
- See Also:
-
getPublicId
- Specified by:
getPublicId
in interfaceLocator
- See Also:
-
getSystemId
- Specified by:
getSystemId
in interfaceLocator
- See Also:
-