- java.lang.Object
-
- util.io.XMLWriter
-
public class XMLWriter extends java.lang.Object
Creates a String representation of a XML-Document. Really simple, no Attributes, only Nodes and TextNodes, no PI's and stuff- Author:
- bodum
-
-
Constructor Summary
Constructors Constructor Description XMLWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getStringForDocument(org.w3c.dom.Document doc, java.lang.String encoding)
Returns a String containg the XML-Documentjava.lang.String
getStringForNode(org.w3c.dom.Node node)
Returns a String for a Nodevoid
writeDocumentToOutputStream(org.w3c.dom.Document doc, java.io.OutputStream out, java.lang.String encoding)
Writes a Document into an Outputstream
-
-
-
Method Detail
-
getStringForDocument
public java.lang.String getStringForDocument(org.w3c.dom.Document doc, java.lang.String encoding)
Returns a String containg the XML-Document- Parameters:
doc
- Documentencoding
- Encoding- Returns:
- Document as String
-
getStringForNode
public java.lang.String getStringForNode(org.w3c.dom.Node node)
Returns a String for a Node- Parameters:
node
- Node- Returns:
- String-Represenation of Node
-
writeDocumentToOutputStream
public void writeDocumentToOutputStream(org.w3c.dom.Document doc, java.io.OutputStream out, java.lang.String encoding) throws java.io.IOException
Writes a Document into an Outputstream- Parameters:
doc
- Documentout
- Outputstreamencoding
- Encoding to use- Throws:
java.io.IOException
- Exception if write failed
-
-