public class XMLUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Integer |
INDENT_NUMBER |
static List<IXMLPrettyPrinter> |
PRINTERS |
| Constructor and Description |
|---|
XMLUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
prettyPrint(String xml)
Indent the given xml with the 4 indentation.
|
static String |
prettyPrint(String xml,
int indent)
Indent the given xml with the given indent number.
|
static AttributesImpl |
toAttributesImpl(Attributes attributes)
Get the SAX
AttributesImpl of teh given attributes to modify attribute values. |
public static final Integer INDENT_NUMBER
public static final List<IXMLPrettyPrinter> PRINTERS
public static String prettyPrint(String xml)
xml - XML to indentExceptionpublic static String prettyPrint(String xml, int indent)
xml - XML to indentindent - the indent number.Exceptionpublic static AttributesImpl toAttributesImpl(Attributes attributes)
AttributesImpl of teh given attributes to modify attribute values.attributes - Copyright © 2017. All Rights Reserved.