public class XMLSerializer extends Object
Constructor and Description |
---|
XMLSerializer(OutputStream pOutput,
String pEncoding) |
Modifier and Type | Method and Description |
---|---|
XMLSerializer |
indentation(String pIndent) |
static void |
main(String[] pArgs) |
void |
serialize(Document pDocument)
Serializes the entire document, along with the XML declaration
(
<?xml version="1.0" encoding="..."?> ). |
void |
serialize(Node pRootNode,
boolean pWriteXMLDeclaration)
Serializes the entire sub tree starting at
pRootNode , along with an optional XML declaration
(<?xml version="1.0" encoding="..."?> ). |
XMLSerializer |
stripComments(boolean pStrip) |
public XMLSerializer(OutputStream pOutput, String pEncoding)
public final XMLSerializer indentation(String pIndent)
public final XMLSerializer stripComments(boolean pStrip)
public void serialize(Document pDocument)
<?xml version="1.0" encoding="..."?>
).pDocument
- the document to serialize.public void serialize(Node pRootNode, boolean pWriteXMLDeclaration)
pRootNode
, along with an optional XML declaration
(<?xml version="1.0" encoding="..."?>
).pRootNode
- the root node to serialize.pWriteXMLDeclaration
- true
if the XML declaration should be included, otherwise false
.public static void main(String[] pArgs) throws IOException, SAXException
IOException
SAXException
Copyright © 2017. All rights reserved.