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.ElementImplThe current node in the document into which elements, text and other nodes will be inserted.protected HTMLDocumentImplThe document that is being built.protected VectorThe 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 TypeMethodDescriptionvoidcharacters(char[] text, int start, int length) voidcharacters(String text) voidvoidendElement(String tagName) voidignorableWhitespace(char[] text, int start, int length) voidprocessingInstruction(String target, String instruction) voidsetDocumentLocator(Locator locator) voidvoidstartElement(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:
startDocumentin interfaceDocumentHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceDocumentHandler- Throws:
SAXException
-
startElement
- Specified by:
startElementin interfaceDocumentHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceDocumentHandler- Throws:
SAXException
-
characters
- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceDocumentHandler- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceDocumentHandler- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceDocumentHandler- Throws:
SAXException
-
getHTMLDocument
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceDocumentHandler
-