public class JAXPXPathEngine extends Object implements XPathEngine
| Constructor and Description |
|---|
JAXPXPathEngine()
Create an XPathEngine that uses JAXP's default XPathFactory
under the covers.
|
JAXPXPathEngine(XPathFactory fac) |
| Modifier and Type | Method and Description |
|---|---|
String |
evaluate(String xPath,
Node n)
Evaluates an XPath expression and stringifies the result.
|
String |
evaluate(String xPath,
Source s)
Evaluates an XPath expression and stringifies the result.
|
Iterable<Node> |
selectNodes(String xPath,
Node n)
Returns a potentially empty collection of Nodes matching an
XPath expression.
|
Iterable<Node> |
selectNodes(String xPath,
Source s)
Returns a potentially empty collection of Nodes matching an
XPath expression.
|
void |
setNamespaceContext(Map<String,String> prefix2Uri)
Establish a namespace context.
|
public JAXPXPathEngine(XPathFactory fac)
public JAXPXPathEngine()
public Iterable<Node> selectNodes(String xPath, Source s)
selectNodes in interface XPathEnginepublic String evaluate(String xPath, Source s)
evaluate in interface XPathEnginepublic Iterable<Node> selectNodes(String xPath, Node n)
selectNodes in interface XPathEnginepublic String evaluate(String xPath, Node n)
evaluate in interface XPathEnginepublic void setNamespaceContext(Map<String,String> prefix2Uri)
setNamespaceContext in interface XPathEngineprefix2Uri - maps from prefix to namespace URI.Copyright © 2001–2017 XMLUnit. All rights reserved.