Package io.hawt.util
Class XmlHelper
- java.lang.Object
-
- io.hawt.util.XmlHelper
-
public class XmlHelper extends java.lang.ObjectA 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 XmlNamespaceFindercreateNamespaceFinder()static javax.xml.parsers.SAXParserFactorygetFactory()static java.util.Set<java.lang.String>getNamespaces(java.io.File file)Returns the namespace URIs found in the given XML filestatic java.util.Set<java.lang.String>getNamespaces(org.xml.sax.InputSource source)Returns the namespace URIs found in the given XML filestatic voidsetFactory(javax.xml.parsers.SAXParserFactory factory)
-
-
-
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.IOExceptionReturns the namespace URIs found in the given XML file- Throws:
javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.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.IOExceptionReturns the namespace URIs found in the given XML file- Throws:
javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
getFactory
public static javax.xml.parsers.SAXParserFactory getFactory()
-
setFactory
public static void setFactory(javax.xml.parsers.SAXParserFactory factory)
-
createNamespaceFinder
protected static XmlNamespaceFinder createNamespaceFinder()
-
-