Package org.custommonkey.xmlunit
Interface XpathEngine
-
- All Known Implementing Classes:
Jaxp13XpathEngine,SimpleXpathEngine
public interface XpathEngineAbstraction of an engine evaluating XPath expressions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringevaluate(String select, Document document)Evaluate the result of executing the specified xpath syntaxselectexpression on the specified documentNodeListgetMatchingNodes(String select, Document document)Execute the specified xpath syntaxselectexpression on the specified document and return the list of nodes (could have length zero) that matchvoidsetNamespaceContext(NamespaceContext ctx)Establish a namespace context.
-
-
-
Method Detail
-
getMatchingNodes
NodeList getMatchingNodes(String select, Document document) throws XpathException
Execute the specified xpath syntaxselectexpression on the specified document and return the list of nodes (could have length zero) that match- Parameters:
select- the XPath expressiondocument- the XML source to apply the expression to- Returns:
- matching nodes
- Throws:
XpathException- if the underlying implementation does
-
evaluate
String evaluate(String select, Document document) throws XpathException
Evaluate the result of executing the specified xpath syntaxselectexpression on the specified document- Parameters:
select- the XPath expressiondocument- the XML source to apply the expression to- Returns:
- evaluated result
- Throws:
XpathException- if the underlying implementation does
-
setNamespaceContext
void setNamespaceContext(NamespaceContext ctx)
Establish a namespace context.- Parameters:
ctx- the NamespaceContext
-
-