Module jonix.xml

Class XmlUtil

java.lang.Object
com.tectonica.xmlchunk.XmlUtil

public class XmlUtil extends Object
  • Constructor Details

    • XmlUtil

      public XmlUtil()
  • Method Details

    • elementToString

      public static String elementToString(Element elem, boolean strip)
      Transforms a DOM Element into an XML text
      Parameters:
      elem - the element to transform into text
      strip - if true, removes the containing tag of the XML node
      Returns:
      an XML text representation of the given element
    • unescape

      public static String unescape(String escaped) throws XMLStreamException
      Transforms an escaped XML into the original, "un-escaped" value (for example turn &lt;Hello&gt; into <Hello>)
      Parameters:
      escaped - the escaped XML string
      Returns:
      the un-escaped XML string
      Throws:
      XMLStreamException