org.custommonkey.xmlunit
public class SimpleXpathEngine extends Object implements XSLTConstants
copy-of
or value-of
XSL template (as
appropriate) to execute the Xpath.
This is not an efficient method for accessing XPaths but it is portable
across underlying transform implementations. (Yes I know Jaxen is too, but
this approach seemed to be the simplest thing that could possibly work...)
Method Summary | |
---|---|
String | evaluate(String select, Document document)
Evaluate the result of executing the specified xpath syntax
select expression on the specified document |
NodeList | getMatchingNodes(String select, Document document)
Execute the specified xpath syntax select expression
on the specified document and return the list of nodes (could have
length zero) that match |
protected Document | getXPathResultAsDocument(String select, Document document)
Execute the copy-of transform and return the resulting Document.
|
protected Node | getXPathResultNode(String select, Document document)
Testable method to execute the copy-of transform and return the root
node of the resulting Document. |
select
expression on the specified documentParameters: select document
Returns: evaluated result
Throws: TransformerException TransformerConfigurationException
select
expression
on the specified document and return the list of nodes (could have
length zero) that matchParameters: select document
Returns: list of matching nodes
Throws: TransformerException TransformerConfigurationException
Parameters: select document
Returns: the Document created by the copy-of transform.
Throws: TransformerException
Parameters: select document
Returns: the root node of the Document created by the copy-of transform.
Throws: TransformerException