public abstract class XmlPretty
extends java.lang.Object
Utility functions for indented pretty-printing of XML documents and elements.
| Constructor and Description |
|---|
XmlPretty() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
printDocument(XmlDocument document)
|
static java.lang.String |
printDocument(XmlDocument document,
int indent)
Return XML element converted to a pretty printed string.
|
static java.lang.String |
printElement(XmlElement element)
|
static java.lang.String |
printElement(XmlElement element,
int indent)
Return XML element converted to a pretty printed string.
|
public static java.lang.String printDocument(XmlDocument document)
document - Document parameter.public static java.lang.String printDocument(XmlDocument document, int indent)
Return XML element converted to a pretty printed string.
document - XML document.indent - Optional starting indentation level. Defaults to zero; nested items are indented by 4.public static java.lang.String printElement(XmlElement element)
element - Element parameter.public static java.lang.String printElement(XmlElement element, int indent)
Return XML element converted to a pretty printed string.
element - XML element.indent - Optional starting indentation level. Defaults to zero; nested items are indented by 4.