Android Utililty Methods XML String Format

List of utility methods to do XML String Format

Description

The list of methods to do XML String Format are organized into topic(s).

Method

StringprettyPrint(String unformattedXml)
pretty Print
try {
    Transformer transformer = TransformerFactory.newInstance()
            .newTransformer();
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    transformer.setOutputProperty(
            "{http://xml.apache.org/xslt}indent-amount", "2");
    StreamResult result = new StreamResult(new StringWriter());
    StreamSource source = new StreamSource(new StringReader(
...
Stringheader()
header
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";