org.browsecode.helpers.xml
Class XMLParser
java.lang.Object
org.browsecode.helpers.xml.XMLParser
public class XMLParser
- extends java.lang.Object
Method Summary |
static org.w3c.dom.Document |
getDocumentFromFileXML(java.lang.String text)
|
static org.w3c.dom.Document |
getDocumentFromRawXML(java.lang.String text)
Must have a top-level node already. |
static org.w3c.dom.Document |
getFromFile(java.io.File file)
|
static org.w3c.dom.Document |
getFromFile(java.lang.String filename)
Get the XML document from a file. |
static org.w3c.dom.Node |
getFromRawText(java.lang.String text)
|
static org.w3c.dom.Node |
getNamedChild(org.w3c.dom.Node node,
java.lang.String name)
|
static org.w3c.dom.Node |
getNamedChildDeep(org.w3c.dom.Node node,
java.lang.String name)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getFromFile
public static org.w3c.dom.Document getFromFile(java.lang.String filename)
throws org.xml.sax.SAXException,
java.io.IOException
- Get the XML document from a file.
- Parameters:
filename
-
- Returns:
-
- Throws:
org.xml.sax.SAXException
java.io.IOException
getFromFile
public static org.w3c.dom.Document getFromFile(java.io.File file)
throws org.xml.sax.SAXException,
java.io.IOException
- Throws:
org.xml.sax.SAXException
java.io.IOException
getFromRawText
public static org.w3c.dom.Node getFromRawText(java.lang.String text)
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
getDocumentFromRawXML
public static org.w3c.dom.Document getDocumentFromRawXML(java.lang.String text)
throws org.xml.sax.SAXException,
java.io.IOException
- Must have a top-level node already.
- Parameters:
text
-
- Returns:
-
- Throws:
org.xml.sax.SAXException
java.io.IOException
getDocumentFromFileXML
public static org.w3c.dom.Document getDocumentFromFileXML(java.lang.String text)
throws org.xml.sax.SAXException,
java.io.IOException
- Throws:
org.xml.sax.SAXException
java.io.IOException
getNamedChild
public static org.w3c.dom.Node getNamedChild(org.w3c.dom.Node node,
java.lang.String name)
getNamedChildDeep
public static org.w3c.dom.Node getNamedChildDeep(org.w3c.dom.Node node,
java.lang.String name)
main
public static final void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception