Class XmlPrettyPrinter

java.lang.Object
org.apache.camel.util.xml.XmlPrettyPrinter

public final class XmlPrettyPrinter extends Object
  • Method Details

    • colorPrint

      public static String colorPrint(String xml, int blanks, boolean declaration, XmlPrettyPrinter.ColorPrintElement color) throws Exception
      Throws:
      Exception
    • pettyPrint

      public static String pettyPrint(String xml, int blanks) throws Exception
      Pretty print the XML (does not use DOM or any kind of parser)
      Parameters:
      xml - the XML
      blanks - number of blanks to use as indent
      Returns:
      the XML in pretty, without XML declaration
      Throws:
      Exception
    • pettyPrint

      public static String pettyPrint(String xml, int blanks, boolean declaration) throws Exception
      Pretty print the XML (does not use DOM or any kind of parser)
      Parameters:
      xml - the XML
      blanks - number of blanks to use as indent
      declaration - whether to include XML declaration
      Returns:
      the XML in pretty
      Throws:
      Exception