public class DOMBuilder extends AbstractSAXPipe
DOMBuilder is a utility class that will generate a W3C
DOM Document from SAX events.| Modifier and Type | Class and Description |
|---|---|
static interface |
DOMBuilder.Listener
The Listener interface must be implemented by those objects willing to
be notified of a successful DOM tree generation.
|
| Constructor and Description |
|---|
DOMBuilder()
Construct a new instance of this DOMBuilder.
|
DOMBuilder(DOMBuilder.Listener listener)
Construct a new instance of this DOMBuilder.
|
DOMBuilder(DOMBuilder.Listener listener,
Node parentNode)
Construct a new instance of this DOMBuilder.
|
DOMBuilder(Node parentNode)
Constructs a new instance that appends nodes to the given parent node.
|
DOMBuilder(SAXTransformerFactory factory)
Construct a new instance of this DOMBuilder.
|
DOMBuilder(SAXTransformerFactory factory,
DOMBuilder.Listener listener,
Node parentNode)
Construct a new instance of this DOMBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
endDocument()
Receive notification of the end of a document.
|
Document |
getDocument()
Return the newly built Document.
|
void |
recycle()
Recycle this builder, prepare for re-use.
|
characters, comment, endCDATA, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMappingsetContentHandlerpublic DOMBuilder()
public DOMBuilder(SAXTransformerFactory factory)
public DOMBuilder(DOMBuilder.Listener listener)
public DOMBuilder(Node parentNode)
Listener when appending to a
Node, because the notification occurs at endDocument()
which does not happen here.public DOMBuilder(DOMBuilder.Listener listener, Node parentNode)
public DOMBuilder(SAXTransformerFactory factory, DOMBuilder.Listener listener, Node parentNode)
public void recycle()
recycle in class AbstractSAXProducerpublic Document getDocument()
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerendDocument in class AbstractSAXPipeSAXException - If this method was not called appropriately.Copyright © 2010 - 2020 Adobe. All Rights Reserved