Class XMLUtil


  • public class XMLUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String escapeXML​(java.lang.String s, boolean onlyASCII)
      Escapes a string with the appropriated XML codes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMLUtil

        public XMLUtil()
    • Method Detail

      • escapeXML

        public static java.lang.String escapeXML​(java.lang.String s,
                                                 boolean onlyASCII)
        Escapes a string with the appropriated XML codes.
        Parameters:
        s - the string to be escaped
        onlyASCII - codes above 127 will always be escaped with &#nn; if true
        Returns:
        the escaped string