Class XMLUtils


  • public abstract class XMLUtils
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SCOPE_SEP  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.lang.String> attributesToMap​(java.lang.String scope, javax.xml.stream.XMLStreamReader reader)  
      static java.util.Map<java.lang.String,​java.lang.String> attributesToMap​(javax.xml.stream.XMLStreamReader reader)  
      static java.lang.String escape​(java.lang.String s)  
      static org.w3c.dom.Document getDocument​(File file)  
      static org.w3c.dom.Document getDocument​(java.io.InputStream inputStream)  
      static org.w3c.dom.Document getDocument​(java.lang.String input)  
      static java.util.List<org.w3c.dom.Element> getFirstLevelElementsByTagName​(org.w3c.dom.Element element, java.lang.String name)  
      static org.w3c.dom.Document getNewDocument()  
      static org.w3c.dom.Document getNewDOMDocument()  
      static XMLWriter newXMLWriter​(java.io.PrintWriter pw)  
      static void putSimpleTextElement​(org.w3c.dom.Document document, org.w3c.dom.Element parentElement, java.lang.String key, java.lang.String value)  
      static org.w3c.dom.Document readDocument​(File file)  
      static org.w3c.dom.Document readDocument​(java.io.InputStream inputStream)  
      • Methods inherited from class java.lang.Object

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

      • escape

        public static java.lang.String escape​(java.lang.String s)
      • newXMLWriter

        public static XMLWriter newXMLWriter​(java.io.PrintWriter pw)
      • attributesToMap

        public static java.util.Map<java.lang.String,​java.lang.String> attributesToMap​(javax.xml.stream.XMLStreamReader reader)
      • attributesToMap

        public static java.util.Map<java.lang.String,​java.lang.String> attributesToMap​(java.lang.String scope,
                                                                                             javax.xml.stream.XMLStreamReader reader)
      • getDocument

        public static org.w3c.dom.Document getDocument​(File file)
      • getNewDocument

        public static org.w3c.dom.Document getNewDocument()
      • getDocument

        public static org.w3c.dom.Document getDocument​(java.lang.String input)
      • getDocument

        public static org.w3c.dom.Document getDocument​(java.io.InputStream inputStream)
      • putSimpleTextElement

        public static void putSimpleTextElement​(org.w3c.dom.Document document,
                                                org.w3c.dom.Element parentElement,
                                                java.lang.String key,
                                                java.lang.String value)
      • getFirstLevelElementsByTagName

        public static java.util.List<org.w3c.dom.Element> getFirstLevelElementsByTagName​(org.w3c.dom.Element element,
                                                                                         java.lang.String name)
      • readDocument

        public static org.w3c.dom.Document readDocument​(java.io.InputStream inputStream)
                                                 throws javax.xml.parsers.ParserConfigurationException,
                                                        java.io.IOException,
                                                        org.xml.sax.SAXException
        Throws:
        javax.xml.parsers.ParserConfigurationException
        java.io.IOException
        org.xml.sax.SAXException
      • readDocument

        public static org.w3c.dom.Document readDocument​(File file)
                                                 throws javax.xml.parsers.ParserConfigurationException,
                                                        java.io.IOException,
                                                        org.xml.sax.SAXException
        Throws:
        javax.xml.parsers.ParserConfigurationException
        java.io.IOException
        org.xml.sax.SAXException
      • getNewDOMDocument

        public static org.w3c.dom.Document getNewDOMDocument()
                                                      throws javax.xml.parsers.ParserConfigurationException
        Throws:
        javax.xml.parsers.ParserConfigurationException