public class XPathUtil extends Object
| Constructor and Description |
|---|
XPathUtil()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Node |
getNode(Node startNode,
Map<String,String> namespaces,
String xPathStr)
|
NodeList |
getNodes(InputStream in,
Map<String,String> namespaces,
String xPathStr)
Parses an
InputStream and returns a NodeList of the given xpath |
NodeList |
getNodes(Node startNode,
Map<String,String> namespaces,
String xPathStr)
|
public NodeList getNodes(InputStream in, Map<String,String> namespaces, String xPathStr) throws IOException, SAXException, ParserConfigurationException, XPathExpressionException
InputStream and returns a NodeList of the given xpathin - the InputStream of the XML structurenamespaces - Map of namespacesxPathStr - String with the xpath expressionNodeList that is the result of the xpath expressionIOException - if the input cannot be readSAXException - if the input is malformed XMLParserConfigurationExceptionXPathExpressionException - in case of an invalid xpathpublic NodeList getNodes(Node startNode, Map<String,String> namespaces, String xPathStr) throws XPathExpressionException
startNode - the Node that is the root of the xpathnamespaces - Map of namespacesxPathStr - String with the xpath expressionNodeList that is the result of the xpath expressionXPathExpressionException - in case of an invalid xpathpublic Node getNode(Node startNode, Map<String,String> namespaces, String xPathStr) throws XPathExpressionException
startNode - the Node that is the root of the xpathnamespaces - Map of namespacesxPathStr - String with the xpath expressionNode that is the result of the xpath expressionXPathExpressionException - in case of an invalid xpathCopyright © 2009-2012 SURFnet bv, The Netherlands. All Rights Reserved.