|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.littleshoot.util.xml.XPathUtils
public class XPathUtils
Implementation of XPath utilities.
| Method Summary | |
|---|---|
int |
getInt(String xPath)
|
Node |
getNode(String xPath)
|
NodeList |
getNodes(String xPath)
|
String |
getString(String xPath)
|
Collection<String> |
getStrings(String xPath)
|
URL |
getUrl(String xPath)
|
static XPathUtils |
newXPath(Document doc)
Creates a new XPathUtils instance. |
static XPathUtils |
newXPath(InputStream is)
Creates a new XPathUtils instance. |
static XPathUtils |
newXPath(String str)
Creates a new XPathUtils instance. |
static XPathUtils |
newXPath(URL url)
Creates a new XPathUtils instance from the data at the specified
HTTP url. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static XPathUtils newXPath(URL url)
XPathUtils instance from the data at the specified
HTTP url.
url - The URL to load XML data from.
XPathUtils instance for the data at the given URL.
public static XPathUtils newXPath(String str)
throws SAXException,
IOException
XPathUtils instance.
str - The string with XML data.
XPathUtils instance.
SAXException - If there's a SAX error in the XML.
IOException - If there's an IO error reading the stream.
public static XPathUtils newXPath(InputStream is)
throws SAXException,
IOException
XPathUtils instance.
is - The InputStream with XML data.
XPathUtils instance.
SAXException - If there's a SAX error in the XML.
IOException - If there's an IO error reading the stream.public static XPathUtils newXPath(Document doc)
XPathUtils instance.
doc - The XML data.
XPathUtils instance.
public int getInt(String xPath)
throws XPathExpressionException
XPathExpressionException
public String getString(String xPath)
throws XPathExpressionException
XPathExpressionException
public NodeList getNodes(String xPath)
throws XPathExpressionException
XPathExpressionException
public Collection<String> getStrings(String xPath)
throws XPathExpressionException
XPathExpressionException
public URL getUrl(String xPath)
throws MalformedURLException,
XPathExpressionException
MalformedURLException
XPathExpressionException
public Node getNode(String xPath)
throws XPathExpressionException
XPathExpressionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||