Package io.hawt.util
Class XmlHelper
- java.lang.Object
-
- io.hawt.util.XmlHelper
-
public class XmlHelper extends 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 XmlNamespaceFindercreateNamespaceFinder()static SAXParserFactorygetFactory()static Set<String>getNamespaces(File file)Returns the namespace URIs found in the given XML filestatic Set<String>getNamespaces(InputSource source)Returns the namespace URIs found in the given XML filestatic voidsetFactory(SAXParserFactory factory)
-
-
-
Method Detail
-
getNamespaces
public static Set<String> getNamespaces(File file) throws ParserConfigurationException, SAXException, IOException
Returns the namespace URIs found in the given XML file
-
getNamespaces
public static Set<String> getNamespaces(InputSource source) throws ParserConfigurationException, SAXException, IOException
Returns the namespace URIs found in the given XML file
-
getFactory
public static SAXParserFactory getFactory()
-
setFactory
public static void setFactory(SAXParserFactory factory)
-
createNamespaceFinder
protected static XmlNamespaceFinder createNamespaceFinder()
-
-