Package esendex.sdk.java.parser
Class XmlPrettyPrinter
java.lang.Object
esendex.sdk.java.parser.XmlPrettyPrinter
Pretty printer for the formating of XML in a neat indented fashion.
- Author:
- Mike Whittaker
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
XmlPrettyPrinter
public XmlPrettyPrinter()
-
-
Method Details
-
format
Format a String as XML in a neat indented fashion. The input is simply returned if there is any problem parseing the XML- Parameters:
input
- the XML to formatindent
- the required amount indent- Returns:
- neatly indented XML or input if XML could not be parsed
-
format
Convenience method forformat(String, int)
that defaults to an indent value of 2.- Parameters:
input
- the XML to format- Returns:
- neatly indented XML or input if XML could not be parsed
-