Package org.apache.html.dom
Class HTMLBuilder
java.lang.Object
org.apache.html.dom.HTMLBuilder
- All Implemented Interfaces:
DocumentHandler
This is a SAX document handler that is used to build an HTML document.
It can build a document from any SAX parser, but is specifically tuned
for working with the OpenXML HTML parser.
- Version:
- $Revision: 1029415 $ $Date: 2010-10-31 22:32:22 +0530 (Sun, 31 Oct 2010) $
- Author:
- Assaf Arkin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.xerces.dom.ElementImpl
The current node in the document into which elements, text and other nodes will be inserted.protected HTMLDocumentImpl
The document that is being built.protected Vector
The document is only created the same time as the document element, however, certain nodes may precede the document element (comment and PI), and they are accumulated in this vector. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] text, int start, int length) void
characters
(String text) void
void
endElement
(String tagName) void
ignorableWhitespace
(char[] text, int start, int length) void
processingInstruction
(String target, String instruction) void
setDocumentLocator
(Locator locator) void
void
startElement
(String tagName, AttributeList attrList)
-
Field Details
-
_document
The document that is being built. -
_current
protected org.apache.xerces.dom.ElementImpl _currentThe current node in the document into which elements, text and other nodes will be inserted. This starts as the document itself and reflects each element that is currently being parsed. -
_preRootNodes
The document is only created the same time as the document element, however, certain nodes may precede the document element (comment and PI), and they are accumulated in this vector.
-
-
Constructor Details
-
HTMLBuilder
public HTMLBuilder()
-
-
Method Details
-
startDocument
- Specified by:
startDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
startElement
- Specified by:
startElement
in interfaceDocumentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceDocumentHandler
- Throws:
SAXException
-
characters
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceDocumentHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceDocumentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceDocumentHandler
- Throws:
SAXException
-
getHTMLDocument
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceDocumentHandler
-