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,
org.w3c.dom.Node parentNode)
Construct a new instance of this DOMBuilder.
|
DOMBuilder(org.w3c.dom.Node parentNode)
Constructs a new instance that appends nodes to the given parent node.
|
DOMBuilder(javax.xml.transform.sax.SAXTransformerFactory factory)
Construct a new instance of this DOMBuilder.
|
DOMBuilder(javax.xml.transform.sax.SAXTransformerFactory factory,
DOMBuilder.Listener listener,
org.w3c.dom.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.
|
org.w3c.dom.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, startPrefixMapping
setContentHandler
public DOMBuilder()
public DOMBuilder(javax.xml.transform.sax.SAXTransformerFactory factory)
public DOMBuilder(DOMBuilder.Listener listener)
public DOMBuilder(org.w3c.dom.Node parentNode)
Listener when appending to a
Node
, because the notification occurs at endDocument()
which does not happen here.
public DOMBuilder(DOMBuilder.Listener listener, org.w3c.dom.Node parentNode)
public DOMBuilder(javax.xml.transform.sax.SAXTransformerFactory factory, DOMBuilder.Listener listener, org.w3c.dom.Node parentNode)
public void recycle()
recycle
in class AbstractSAXProducer
public org.w3c.dom.Document getDocument()
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class AbstractSAXPipe
org.xml.sax.SAXException
- If this method was not called appropriately."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"