|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.fascinator.common.sax.SafeSAXReader
public class SafeSAXReader
A basic util class to instantiate a SAX Reader and parse documents whilst retaining original escaped characters.
Credit due : http://asfak.wordpress.com/2009/08/29/escaping-or-unescaping-special- characters-while-writing-xml-files-using-dom4j/
| Constructor Summary | |
|---|---|
SafeSAXReader()
Constructor |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SafeSAXReader()
| Method Detail |
|---|
public org.dom4j.Document loadDocument(java.lang.String inDoc)
throws org.dom4j.DocumentException
inDoc - document to be read
org.dom4j.DocumentException - if fail to read the document
public org.dom4j.Document loadDocumentFromStream(java.io.InputStream inStream)
throws org.dom4j.DocumentException
inStream - input stream to be read
org.dom4j.DocumentException - if fail to read the document
public java.lang.String docToString(org.dom4j.Node outDoc)
throws java.io.IOException
outDoc - Node to be converted
java.io.IOException - if the conversion fail
public void docToStream(org.dom4j.Node outDoc,
java.io.OutputStream outStream)
throws java.io.IOException
outDoc - Node to be convertedoutStream - output stream of the converted node
java.io.IOException - if the conversion fail
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||