Package org.xmlunit.xpath
Interface XPathEngine
-
- All Known Implementing Classes:
JAXPXPathEngine
public interface XPathEngineInterface for XMLUnit's XPath abstraction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringevaluate(String xPath, Source s)Evaluates an XPath expression and stringifies the result.Stringevaluate(String xPath, Node n)Evaluates an XPath expression and stringifies the result.Iterable<Node>selectNodes(String xPath, Source s)Returns a potentially empty collection of Nodes matching an XPath expression.Iterable<Node>selectNodes(String xPath, Node n)Returns a potentially empty collection of Nodes matching an XPath expression.voidsetNamespaceContext(Map<String,String> prefix2Uri)Establish a namespace context.
-
-
-
Method Detail
-
selectNodes
Iterable<Node> selectNodes(String xPath, Source s)
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
String evaluate(String xPath, Source s)
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
Iterable<Node> selectNodes(String xPath, Node n)
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
String evaluate(String xPath, Node n)
Evaluates an XPath expression and stringifies the result.- Parameters:
xPath- the XPath expressionn- the XML source to apply the expression to- Returns:
- stringified result
-
-