Class XmlHelper

java.lang.Object
org.apache.camel.dsl.jbang.core.common.XmlHelper

public final class XmlHelper extends Object
  • Method Details

    • prettyPrint

      public static String prettyPrint(String xml, int spaces) throws Exception
      Prints the XML in pretty mode (no color).
      Throws:
      Exception
    • colorPrint

      public static String colorPrint(String xml, int spaces, boolean pretty) throws Exception
      Prints the XML with ANSi color (similar to jq)
      Throws:
      Exception
    • createDocumentBuilderFactory

      public static DocumentBuilderFactory createDocumentBuilderFactory()