|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scijava.util.XML
public class XML
Helper class for working with XML documents.
Constructor Summary | |
---|---|
XML(Document doc)
Creates an XML object for an existing document. |
|
XML(File file)
Parses XML from the given file. |
|
XML(InputStream in)
Parses XML from the given input stream. |
|
XML(String s)
Parses XML from the given string. |
|
XML(String path,
Document doc)
Creates an XML object for an existing document. |
|
XML(URL url)
Parses XML from the given URL. |
Method Summary | |
---|---|
String |
cdata(String expression)
Obtains the CDATA identified by the given XPath expression. |
Document |
getDocument()
Gets the XML's DOM representation. |
String |
getPath()
Gets the path to the XML document, or null if none. |
protected static Document |
loadXML(InputStream in)
Loads an XML document from the given input stream. |
protected static Document |
loadXML(String s)
Loads an XML document from the given input stream. |
String |
toString()
|
NodeList |
xpath(String expression)
Obtains the nodes identified by the given XPath expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XML(File file) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
public XML(URL url) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
public XML(InputStream in) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
public XML(String s) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
public XML(Document doc)
public XML(String path, Document doc)
Method Detail |
---|
public String getPath()
public Document getDocument()
public String cdata(String expression)
public NodeList xpath(String expression)
public String toString()
toString
in class Object
protected static Document loadXML(InputStream in) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
protected static Document loadXML(String s) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |