public class DOM2SAX extends Object
Part of the code here copied and adapted from Apache Xalan-J, src/org/apache/xalan/xsltc/trax/DOM2SAX.java
Constructor and Description |
---|
DOM2SAX(ContentHandler handler)
Main constructor
|
Modifier and Type | Method and Description |
---|---|
void |
writeDocument(Document doc,
boolean fragment)
Writes the given document using the given ContentHandler.
|
void |
writeFragment(Node node)
Writes the given fragment using the given ContentHandler.
|
public DOM2SAX(ContentHandler handler)
handler
- the ContentHandler to send SAX events topublic void writeDocument(Document doc, boolean fragment) throws SAXException
doc
- DOM documentfragment
- if false no startDocument() and endDocument() calls are issued.SAXException
- In case of a problem while writing XMLpublic void writeFragment(Node node) throws SAXException
node
- DOM nodeSAXException
- In case of a problem while writing XMLCopyright © 2022 Apache Software Foundation. All rights reserved.