Package org.xmlunit.xpath
Class JAXPXPathEngine
java.lang.Object
org.xmlunit.xpath.JAXPXPathEngine
- All Implemented Interfaces:
XPathEngine
Simplified access to JAXP's XPath API.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate an XPathEngine that uses JAXP's default XPathFactory under the covers. -
Method Summary
Modifier and TypeMethodDescriptionEvaluates an XPath expression and stringifies the result.Evaluates an XPath expression and stringifies the result.selectNodes
(String xPath, Source s) Returns a potentially empty collection of Nodes matching an XPath expression.selectNodes
(String xPath, Node n) Returns a potentially empty collection of Nodes matching an XPath expression.void
setNamespaceContext
(Map<String, String> prefix2Uri) Establish a namespace context.
-
Field Details
-
xpath
-
-
Constructor Details
-
JAXPXPathEngine
-
JAXPXPathEngine
public JAXPXPathEngine()Create an XPathEngine that uses JAXP's default XPathFactory under the covers.
-
-
Method Details
-
selectNodes
Returns a potentially empty collection of Nodes matching an XPath expression.- Specified by:
selectNodes
in interfaceXPathEngine
-
evaluate
Evaluates an XPath expression and stringifies the result.- Specified by:
evaluate
in interfaceXPathEngine
-
selectNodes
Returns a potentially empty collection of Nodes matching an XPath expression.- Specified by:
selectNodes
in interfaceXPathEngine
-
evaluate
Evaluates an XPath expression and stringifies the result.- Specified by:
evaluate
in interfaceXPathEngine
-
setNamespaceContext
Establish a namespace context.- Specified by:
setNamespaceContext
in interfaceXPathEngine
- Parameters:
prefix2Uri
- maps from prefix to namespace URI.
-