public class DOMStreamer
extends java.lang.Object
DOMStreamer
is a utility class that will generate SAX
events from a W3C DOM Document.
The DOMStreamer uses a different strategy based on the value of the normalizeNamespaces property:
DOMStreamer.NamespaceNormalizingDOMStreamer
.
Modifier and Type | Class and Description |
---|---|
static class |
DOMStreamer.DefaultDOMStreamer
The
DefaultDOMStreamer is a utility class that will generate SAX
events from a W3C DOM Document. |
static class |
DOMStreamer.NamespaceNormalizingDOMStreamer
Streams a DOM tree to SAX events and normalizes namespace declarations on the way.
|
Constructor and Description |
---|
DOMStreamer()
Create a new
DOMStreamer instance. |
DOMStreamer(org.xml.sax.ContentHandler content)
Create a new
DOMStreamer instance. |
Modifier and Type | Method and Description |
---|---|
boolean |
isNormalizeNamespaces() |
void |
recycle() |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Set the
ContentHandler that will receive XML data. |
void |
setNormalizeNamespaces(boolean normalizeNamespaces) |
void |
stream(org.w3c.dom.Node node)
Start the production of SAX events.
|
public DOMStreamer()
DOMStreamer
instance.public DOMStreamer(org.xml.sax.ContentHandler content)
DOMStreamer
instance.public void setContentHandler(org.xml.sax.ContentHandler handler)
ContentHandler
that will receive XML data.public void stream(org.w3c.dom.Node node) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public boolean isNormalizeNamespaces()
public void setNormalizeNamespaces(boolean normalizeNamespaces)
public void recycle()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"