Other Classes: Class HTMLBuilder

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.html.dom
Class HTMLBuilder

    java.lang.Object
      |
      +--org.apache.html.dom.HTMLBuilder

All Implemented Interfaces:
  org.xml.sax.DocumentHandler

public class HTMLBuilder
extends java.lang.Object
implements org.xml.sax.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: 449313 $ $Date: 2006-09-23 18:01:43 -0400 (Sat, 23 Sep 2006) $
Author:
  Assaf Arkin

Field Summary
`protected org.apache.xerces.dom.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 java.util.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.

Constructor Summary
`HTMLBuilder()`

Method Summary
`void` | `characters(char[] text, int start, int length)`
`void` | `characters(java.lang.String text)`
`void` | `endDocument()`
`void` | `endElement(java.lang.String tagName)`
`org.w3c.dom.html.HTMLDocument` | `getHTMLDocument()`
`void` | `ignorableWhitespace(char[] text, int start, int length)`
`void` | `processingInstruction(java.lang.String target, java.lang.String instruction)`
`void` | `setDocumentLocator(org.xml.sax.Locator locator)`
`void` | `startDocument()`
`void` | `startElement(java.lang.String tagName, org.xml.sax.AttributeList attrList)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _document

    protected HTMLDocumentImpl _document

  The document that is being built.

### _current

    protected org.apache.xerces.dom.ElementImpl _current

  The 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

    protected java.util.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.

Constructor Detail

### HTMLBuilder

    public HTMLBuilder()

Method Detail

### startDocument

    public void startDocument()
                       throws org.xml.sax.SAXException

  Specified by:
    `startDocument` in interface `org.xml.sax.DocumentHandler`

### endDocument

    public void endDocument()
                     throws org.xml.sax.SAXException

  Specified by:
    `endDocument` in interface `org.xml.sax.DocumentHandler`

### startElement

    public void startElement(java.lang.String tagName,
                             org.xml.sax.AttributeList attrList)
                      throws org.xml.sax.SAXException

  Specified by:
    `startElement` in interface `org.xml.sax.DocumentHandler`

### endElement

    public void endElement(java.lang.String tagName)
                    throws org.xml.sax.SAXException

  Specified by:
    `endElement` in interface `org.xml.sax.DocumentHandler`

### characters

    public void characters(java.lang.String text)
                    throws org.xml.sax.SAXException

### characters

    public void characters(char[] text,
                           int start,
                           int length)
                    throws org.xml.sax.SAXException

  Specified by:
    `characters` in interface `org.xml.sax.DocumentHandler`

### ignorableWhitespace

    public void ignorableWhitespace(char[] text,
                                    int start,
                                    int length)
                             throws org.xml.sax.SAXException

  Specified by:
    `ignorableWhitespace` in interface `org.xml.sax.DocumentHandler`

### processingInstruction

    public void processingInstruction(java.lang.String target,
                                      java.lang.String instruction)
                               throws org.xml.sax.SAXException

  Specified by:
    `processingInstruction` in interface `org.xml.sax.DocumentHandler`

### getHTMLDocument

    public org.w3c.dom.html.HTMLDocument getHTMLDocument()

### setDocumentLocator

    public void setDocumentLocator(org.xml.sax.Locator locator)

  Specified by:
    `setDocumentLocator` in interface `org.xml.sax.DocumentHandler`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2007 The Apache Software Foundation. All Rights Reserved.