Class XMLUtil

java.lang.Object
com.tremolosecurity.proxy.util.XMLUtil

public final class XMLUtil extends Object
Author:
Ovidiu Feodorov, Tim Fox
  • Method Details

    • 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)
      This metod is here because Node.getTextContent() is not available in JDK 1.4 and I would like to have an uniform access to this functionality.

      Note: if the content is another element or set of elements, it returns a string representation of the hierarchy.

      TODO implementation of this method is a hack. Implement it properly.