public class SafeSAXReader
extends java.lang.Object
Credit due : http://asfak.wordpress.com/2009/08/29/escaping-or-unescaping-special- characters-while-writing-xml-files-using-dom4j/
| Constructor and Description |
|---|
SafeSAXReader()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
docToStream(org.dom4j.Node outDoc,
java.io.OutputStream outStream)
Convert node to stream
|
java.lang.String |
docToString(org.dom4j.Node outDoc)
Convert node to string
|
org.dom4j.Document |
loadDocument(java.lang.String inDoc)
Load Document from specified String
|
org.dom4j.Document |
loadDocumentFromStream(java.io.InputStream inStream)
Load Document from specified Input Stream
|
public org.dom4j.Document loadDocument(java.lang.String inDoc)
throws org.dom4j.DocumentException
inDoc - document to be readorg.dom4j.DocumentException - if fail to read the documentpublic org.dom4j.Document loadDocumentFromStream(java.io.InputStream inStream)
throws org.dom4j.DocumentException
inStream - input stream to be readorg.dom4j.DocumentException - if fail to read the documentpublic java.lang.String docToString(org.dom4j.Node outDoc)
throws java.io.IOException
outDoc - Node to be convertedjava.io.IOException - if the conversion failpublic void docToStream(org.dom4j.Node outDoc,
java.io.OutputStream outStream)
throws java.io.IOException
outDoc - Node to be convertedoutStream - output stream of the converted nodejava.io.IOException - if the conversion failCopyright © 2009-2018. All Rights Reserved.