Package org.custommonkey.xmlunit.jaxp13
Class Jaxp13XpathEngine
- java.lang.Object
-
- org.custommonkey.xmlunit.jaxp13.Jaxp13XpathEngine
-
- All Implemented Interfaces:
XpathEngine
public class Jaxp13XpathEngine extends java.lang.Object implements XpathEngine
XPath engine based on javax.xml.xpath.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Jaxp13XpathEngine.NodeListForIterable
-
Field Summary
Fields Modifier and Type Field Description private JAXPXPathEngine
engine
-
Constructor Summary
Constructors Constructor Description Jaxp13XpathEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
evaluate(java.lang.String select, org.w3c.dom.Document document)
Evaluate the result of executing the specified xpath syntaxselect
expression on the specified documentorg.w3c.dom.NodeList
getMatchingNodes(java.lang.String select, org.w3c.dom.Document document)
Execute the specified xpath syntaxselect
expression on the specified document and return the list of nodes (could have length zero) that matchvoid
setNamespaceContext(NamespaceContext ctx)
Establish a namespace context.
-
-
-
Field Detail
-
engine
private final JAXPXPathEngine engine
-
-
Constructor Detail
-
Jaxp13XpathEngine
public Jaxp13XpathEngine() throws ConfigurationException
- Throws:
ConfigurationException
-
-
Method Detail
-
getMatchingNodes
public org.w3c.dom.NodeList getMatchingNodes(java.lang.String select, org.w3c.dom.Document document) throws XpathException
Execute the specified xpath syntaxselect
expression on the specified document and return the list of nodes (could have length zero) that match- Specified by:
getMatchingNodes
in interfaceXpathEngine
- Parameters:
select
-document
-- Returns:
- list of matching nodes
- Throws:
XpathException
-
evaluate
public java.lang.String evaluate(java.lang.String select, org.w3c.dom.Document document) throws XpathException
Evaluate the result of executing the specified xpath syntaxselect
expression on the specified document- Specified by:
evaluate
in interfaceXpathEngine
- Parameters:
select
-document
-- Returns:
- evaluated result
- Throws:
XpathException
-
setNamespaceContext
public void setNamespaceContext(NamespaceContext ctx)
Description copied from interface:XpathEngine
Establish a namespace context.- Specified by:
setNamespaceContext
in interfaceXpathEngine
-
-