Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public XML(File file) throws ParserConfigurationException, SAXException, IOException
public XML(URL url) throws ParserConfigurationException, SAXException, IOException
public XML(InputStream in) throws ParserConfigurationException, SAXException, IOException
public XML(String s) throws ParserConfigurationException, SAXException, IOException
public XML(Document doc)
public String getPath()
public Document getDocument()
public String cdata(String expression)
public NodeList xpath(String expression)
protected static Document loadXML(InputStream in) throws ParserConfigurationException, SAXException, IOException
protected static Document loadXML(String s) throws ParserConfigurationException, SAXException, IOException
Copyright © 2009–2015 SciJava. All rights reserved.