public class DOM2SAX
extends java.lang.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(org.xml.sax.ContentHandler handler)
Main constructor
|
Modifier and Type | Method and Description |
---|---|
void |
writeDocument(org.w3c.dom.Document doc,
boolean fragment)
Writes the given document using the given ContentHandler.
|
void |
writeFragment(org.w3c.dom.Node node)
Writes the given fragment using the given ContentHandler.
|
public DOM2SAX(org.xml.sax.ContentHandler handler)
handler
- the ContentHandler to send SAX events topublic void writeDocument(org.w3c.dom.Document doc, boolean fragment) throws org.xml.sax.SAXException
doc
- DOM documentfragment
- if false no startDocument() and endDocument() calls are issued.org.xml.sax.SAXException
- In case of a problem while writing XMLpublic void writeFragment(org.w3c.dom.Node node) throws org.xml.sax.SAXException
node
- DOM nodeorg.xml.sax.SAXException
- In case of a problem while writing XMLCopyright 1999-2017 The Apache Software Foundation. All Rights Reserved.