Class XmlUtility


  • class XmlUtility
    extends java.lang.Object
    XML utility methods.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.util.regex.Pattern WhitespacePattern  
    • Constructor Summary

      Constructors 
      Constructor Description
      XmlUtility()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.xml.parsers.DocumentBuilder createDomParser​(boolean validate, boolean ignoreIgnorableWhitespace, boolean usingSchema, org.xml.sax.ErrorHandler handler)  
      static java.lang.String decodeEncodedString​(java.lang.String enc)  
      static org.w3c.dom.Document getDocument​(java.io.File file)  
      static void save​(java.io.Writer writer, org.w3c.dom.Document document)  
      static void stripWhitespace​(org.w3c.dom.Element element)  
      static java.lang.String toString​(org.w3c.dom.Element xmlRoot)  
      • Methods inherited from class java.lang.Object

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

      • WhitespacePattern

        static final java.util.regex.Pattern WhitespacePattern
    • Constructor Detail

      • XmlUtility

        XmlUtility()
    • Method Detail

      • createDomParser

        public static javax.xml.parsers.DocumentBuilder createDomParser​(boolean validate,
                                                                        boolean ignoreIgnorableWhitespace,
                                                                        boolean usingSchema,
                                                                        org.xml.sax.ErrorHandler handler)
      • getDocument

        public static org.w3c.dom.Document getDocument​(java.io.File file)
                                                throws java.io.IOException,
                                                       org.xml.sax.SAXException
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
      • save

        public static void save​(java.io.Writer writer,
                                org.w3c.dom.Document document)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeEncodedString

        public static java.lang.String decodeEncodedString​(java.lang.String enc)
      • stripWhitespace

        public static void stripWhitespace​(org.w3c.dom.Element element)
      • toString

        public static java.lang.String toString​(org.w3c.dom.Element xmlRoot)