Package com.twelvemonkeys.xml
Class XMLSerializer
- java.lang.Object
-
- com.twelvemonkeys.xml.XMLSerializer
-
public class XMLSerializer extends java.lang.ObjectXMLSerializer- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/xml/XMLSerializer.java#1 $
- Author:
- Harald Kuhr, last modified by $Author: haku $
-
-
Constructor Summary
Constructors Constructor Description XMLSerializer(java.io.OutputStream pOutput, java.lang.String pEncoding)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description XMLSerializerindentation(java.lang.String pIndent)static voidmain(java.lang.String[] pArgs)voidserialize(org.w3c.dom.Document pDocument)Serializes the entire document, along with the XML declaration (<?xml version="1.0" encoding="..."?>).voidserialize(org.w3c.dom.Node pRootNode, boolean pWriteXMLDeclaration)Serializes the entire sub tree starting atpRootNode, along with an optional XML declaration (<?xml version="1.0" encoding="..."?>).XMLSerializerstripComments(boolean pStrip)
-
-
-
Method Detail
-
indentation
public final XMLSerializer indentation(java.lang.String pIndent)
-
stripComments
public final XMLSerializer stripComments(boolean pStrip)
-
serialize
public void serialize(org.w3c.dom.Document pDocument)
Serializes the entire document, along with the XML declaration (<?xml version="1.0" encoding="..."?>).- Parameters:
pDocument- the document to serialize.
-
serialize
public void serialize(org.w3c.dom.Node pRootNode, boolean pWriteXMLDeclaration)Serializes the entire sub tree starting atpRootNode, along with an optional XML declaration (<?xml version="1.0" encoding="..."?>).- Parameters:
pRootNode- the root node to serialize.pWriteXMLDeclaration-trueif the XML declaration should be included, otherwisefalse.
-
main
public static void main(java.lang.String[] pArgs) throws java.io.IOException, org.xml.sax.SAXException- Throws:
java.io.IOExceptionorg.xml.sax.SAXException
-
-