Package io.hawt.util

Class XmlHelper


  • public class XmlHelper
    extends java.lang.Object
    A helper method to get the namespaces on an XML file
    • Constructor Summary

      Constructors 
      Constructor Description
      XmlHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static XmlNamespaceFinder createNamespaceFinder()  
      static javax.xml.parsers.SAXParserFactory getFactory()  
      static java.util.Set<java.lang.String> getNamespaces​(java.io.File file)
      Returns the namespace URIs found in the given XML file
      static java.util.Set<java.lang.String> getNamespaces​(org.xml.sax.InputSource source)
      Returns the namespace URIs found in the given XML file
      static void setFactory​(javax.xml.parsers.SAXParserFactory factory)  
      • Methods inherited from class java.lang.Object

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

      • XmlHelper

        public XmlHelper()
    • Method Detail

      • getNamespaces

        public static java.util.Set<java.lang.String> getNamespaces​(java.io.File file)
                                                             throws javax.xml.parsers.ParserConfigurationException,
                                                                    org.xml.sax.SAXException,
                                                                    java.io.IOException
        Returns the namespace URIs found in the given XML file
        Throws:
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
        java.io.IOException
      • getNamespaces

        public static java.util.Set<java.lang.String> getNamespaces​(org.xml.sax.InputSource source)
                                                             throws javax.xml.parsers.ParserConfigurationException,
                                                                    org.xml.sax.SAXException,
                                                                    java.io.IOException
        Returns the namespace URIs found in the given XML file
        Throws:
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
        java.io.IOException
      • getFactory

        public static javax.xml.parsers.SAXParserFactory getFactory()
      • setFactory

        public static void setFactory​(javax.xml.parsers.SAXParserFactory factory)