org.enhydra.apache.html.dom
Class HTMLBuilder
java.lang.Object
|
+--org.enhydra.apache.html.dom.HTMLBuilder
- All Implemented Interfaces:
- DocumentHandler
- public class HTMLBuilder
- extends Object
- implements 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: 1.2 $ $Date: 2005/01/26 08:28:44 $
- Author:
- Assaf Arkin
Field Summary |
protected ElementImpl |
_current
The current node in the document into which elements, text and
other nodes will be inserted. |
protected HTMLDocumentImpl |
_document
The document that is being built. |
protected Vector |
_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. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_document
protected HTMLDocumentImpl _document
- The document that is being built.
_current
protected ElementImpl _current
- The current node in the document into which elements, text and
other nodes will be inserted. This starts as the document iself
and reflects each element that is currently being parsed.
_preRootNodes
protected Vector _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.
HTMLBuilder
public HTMLBuilder()
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface DocumentHandler
endDocument
public void endDocument()
throws SAXException
- Specified by:
endDocument
in interface DocumentHandler
startElement
public void startElement(String tagName,
AttributeList attrList)
throws SAXException
- Specified by:
startElement
in interface DocumentHandler
endElement
public void endElement(String tagName)
throws SAXException
- Specified by:
endElement
in interface DocumentHandler
characters
public void characters(String text)
throws SAXException
characters
public void characters(char[] text,
int start,
int length)
throws SAXException
- Specified by:
characters
in interface DocumentHandler
ignorableWhitespace
public void ignorableWhitespace(char[] text,
int start,
int length)
throws SAXException
- Specified by:
ignorableWhitespace
in interface DocumentHandler
processingInstruction
public void processingInstruction(String target,
String instruction)
throws SAXException
- Specified by:
processingInstruction
in interface DocumentHandler
getHTMLDocument
public HTMLDocument getHTMLDocument()
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interface DocumentHandler
Copyright © 1999 The Apache Software Foundation. All Rights reserved.