Class XMLUtil

java.lang.Object
org.apache.activemq.artemis.utils.XMLUtil

public final class XMLUtil extends Object
  • Field Details

    • CONSIDER_OS_ENV_PROP

      public static String CONSIDER_OS_ENV_PROP
  • Method Details

    • streamToElement

      public static Element streamToElement(InputStream inputStream) throws Exception
      Throws:
      Exception
    • stringToElement

      public static Element stringToElement(String s) throws Exception
      Throws:
      Exception
    • urlToElement

      public static Element urlToElement(URL url) throws Exception
      Throws:
      Exception
    • readerToString

      public static String readerToString(Reader r) throws Exception
      Throws:
      Exception
    • readerToElement

      public static Element readerToElement(Reader r) throws Exception
      Throws:
      Exception
    • elementToString

      public static String elementToString(Node n)
    • getTextContent

      public static String getTextContent(Node n)
      Note: if the content is another element or set of elements, it returns a string representation of the hierarchy.
    • assertEquivalent

      public static void assertEquivalent(Node node, Node node2)
    • stripCDATA

      public static String stripCDATA(String s)
    • replaceSystemPropsInString

      public static String replaceSystemPropsInString(String xml)
    • replaceSystemPropsInXml

      public static Document replaceSystemPropsInXml(Document doc)
    • parseLong

      public static long parseLong(Node elem)
    • parseInt

      public static int parseInt(Node elem)
    • parseInt

      public static int parseInt(Node elem, String value)
    • parseBoolean

      public static boolean parseBoolean(Node elem)
    • parseDouble

      public static double parseDouble(Node elem)
    • validate

      public static void validate(Node node, String schemaFile) throws Exception
      Throws:
      Exception
    • findResource

      public static URL findResource(String resourceName)