Package org.xmlunit.xpath
Interface XPathEngine
- All Known Implementing Classes:
JAXPXPathEngine
public interface XPathEngine
Interface for XMLUnit's XPath abstraction.
-
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.
-
Method Details
-
selectNodes
Returns a potentially empty collection of Nodes matching an XPath expression.- Parameters:
xPath
- the XPath expressions
- the XML source to apply the expression to- Returns:
- matching nodes
-
evaluate
Evaluates an XPath expression and stringifies the result.- Parameters:
xPath
- the XPath expressions
- the XML source to apply the expression to- Returns:
- stringified result
-
selectNodes
Returns a potentially empty collection of Nodes matching an XPath expression.- Parameters:
xPath
- the XPath expressionn
- the XML source to apply the expression to- Returns:
- matching nodes
-
evaluate
Evaluates an XPath expression and stringifies the result.- Parameters:
xPath
- the XPath expressionn
- the XML source to apply the expression to- Returns:
- stringified result
-
setNamespaceContext
Establish a namespace context.- Parameters:
prefix2Uri
- maps from prefix to namespace URI.
-