Class TreeParser
java.lang.Object
nu.validator.saxtree.TreeParser
- All Implemented Interfaces:
Locator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ContentHandlerThe content handler.private final LexicalHandlerThe lexical handler.private LocatorThe current locator. -
Constructor Summary
ConstructorsConstructorDescriptionTreeParser(ContentHandler contentHandler, LexicalHandler lexicalHandler) The constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) voidcharacters(char[] ch, int start, int length, Locator locator) (package private) void(package private) void(package private) voidendDocument(Locator locator) (package private) void(package private) voidendElement(String uri, String localName, String qName, Locator locator) (package private) void(package private) voidendPrefixMapping(String prefix, Locator locator) intint(package private) voidignorableWhitespace(char[] ch, int start, int length, Locator locator) voidCauses SAX events for the tree rooted at the argument to be emitted.(package private) voidprocessingInstruction(String target, String data, Locator locator) (package private) voidskippedEntity(String name, Locator locator) (package private) voidstartCDATA(Locator locator) (package private) voidstartDocument(Locator locator) (package private) void(package private) voidstartElement(String uri, String localName, String qName, Attributes atts, Locator locator) (package private) voidstartEntity(String name, Locator locator) (package private) voidstartPrefixMapping(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 benulllexicalHandler- may benull
-
-
Method Details
-
parse
Causes SAX events for the tree rooted at the argument to be emitted.startDocument()andendDocument()are only emitted for aDocumentnode.- 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:
getColumnNumberin interfaceLocator- See Also:
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceLocator- See Also:
-
getPublicId
- Specified by:
getPublicIdin interfaceLocator- See Also:
-
getSystemId
- Specified by:
getSystemIdin interfaceLocator- See Also:
-