|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.xml.sax.ext.DefaultHandler2
org.jdesktop.dom.HTMLBuilder
class HTMLBuilder extends DefaultHandler2
This is a SAX document handler that is used to build an HTML document. It can build a document from any SAX parser. NOTE: I'm not sure how copyright works in this case. The original code was BSD. It was copied here and somewhat altered. Hopefully in the future we can just use Xerces, and it will implement the HTML parsing for us.
| 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 org.apache.html.dom.HTMLDocumentImpl |
_document
The document that is being built. |
private boolean |
_done
Indicates whether finished building a document. |
private boolean |
_ignoreWhitespace
Applies only to whitespace appearing between element tags in element content, as per the SAX definition, and true by default. |
private Locator |
_locator
A reference to the current locator, this is generally the parser itself. |
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. |
| Constructor Summary | |
HTMLBuilder()
|
|
| Method Summary | |
|---|---|
void
|
characters(char[] text, int start, int length)
|
void
|
endDocument()
|
void
|
endElement(String uri, String localName, String qName)
|
org.w3c.dom.html.HTMLDocument
|
getHTMLDocument()
|
private String
|
getName(String qName, String localName)
|
void
|
ignorableWhitespace(char[] text, int start, int length)
|
void
|
processingInstruction(String target, String instruction)
|
void
|
setDocumentLocator(Locator locator)
|
void
|
startDocument()
|
void
|
startElement(String uri, String localName, String qName, Attributes attrList)
|
| Methods inherited from class DefaultHandler | |
|---|---|
| fatalError, error, warning, resolveEntity, processingInstruction, startDocument, startElement, characters, ignorableWhitespace, endElement, endDocument, unparsedEntityDecl, notationDecl, setDocumentLocator, startPrefixMapping, endPrefixMapping, skippedEntity, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
protected org.apache.xerces.dom.ElementImpl _current
protected org.apache.html.dom.HTMLDocumentImpl _document
private boolean _done
private boolean _ignoreWhitespace
private Locator _locator
protected Vector _preRootNodes
| Constructor Detail |
|---|
HTMLBuilder()
| Method Detail |
|---|
public void characters(char[] text, int start, int length)
public void endDocument()
public void endElement(String uri, String localName, String qName)
public org.w3c.dom.html.HTMLDocument getHTMLDocument()
private String getName(String qName, String localName)
public void ignorableWhitespace(char[] text, int start, int length)
public void processingInstruction(String target, String instruction)
public void setDocumentLocator(Locator locator)
public void startDocument()
public void startElement(String uri, String localName, String qName, Attributes attrList)
Groovy Documentation