Package org.apache.camel.util.xml
Class XmlPrettyPrinter
java.lang.Object
org.apache.camel.util.xml.XmlPrettyPrinter
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
colorPrint
(String xml, int blanks, boolean declaration, XmlPrettyPrinter.ColorPrintElement color) static String
pettyPrint
(String xml, int blanks) Pretty print the XML (does not use DOM or any kind of parser)static String
pettyPrint
(String xml, int blanks, boolean declaration) Pretty print the XML (does not use DOM or any kind of parser)
-
Method Details
-
colorPrint
public static String colorPrint(String xml, int blanks, boolean declaration, XmlPrettyPrinter.ColorPrintElement color) throws Exception - Throws:
Exception
-
pettyPrint
Pretty print the XML (does not use DOM or any kind of parser)- Parameters:
xml
- the XMLblanks
- number of blanks to use as indent- Returns:
- the XML in pretty, without XML declaration
- Throws:
Exception
-
pettyPrint
Pretty print the XML (does not use DOM or any kind of parser)- Parameters:
xml
- the XMLblanks
- number of blanks to use as indentdeclaration
- whether to include XML declaration- Returns:
- the XML in pretty
- Throws:
Exception
-