|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XPathOperations
Interface that specifies a basic set of XPath operations, implemented by various XPathTemplates. Contains numerous evaluation methods,
The templates that implement this interface do not use precompiled XPath expressions. Consider using theXPathExpressionFactory or the XPathExpressionFactoryBean for optimal performance, but less flexibility.
Jaxp13XPathTemplate,
JaxenXPathTemplate| Method Summary | |
|---|---|
void |
evaluate(java.lang.String expression,
javax.xml.transform.Source context,
NodeCallbackHandler callbackHandler)
Evaluates the given expression, handling the result Node objects on a per-node basis with a NodeCallbackHandler. |
java.util.List |
evaluate(java.lang.String expression,
javax.xml.transform.Source context,
NodeMapper nodeMapper)
Evaluates the given expression, mapping each result Node objects to a Java object via a NodeMapper. |
boolean |
evaluateAsBoolean(java.lang.String expression,
javax.xml.transform.Source context)
Evaluates the given expression as a boolean. |
double |
evaluateAsDouble(java.lang.String expression,
javax.xml.transform.Source context)
Evaluates the given expression as a double. |
org.w3c.dom.Node |
evaluateAsNode(java.lang.String expression,
javax.xml.transform.Source context)
Evaluates the given expression as a Node. |
java.util.List |
evaluateAsNodeList(java.lang.String expression,
javax.xml.transform.Source context)
Evaluates the given expression as a list of Node objects. |
java.lang.Object |
evaluateAsObject(java.lang.String expression,
javax.xml.transform.Source context,
NodeMapper nodeMapper)
Evaluates the given expression, mapping a single Node result to a Java object via a NodeMapper. |
java.lang.String |
evaluateAsString(java.lang.String expression,
javax.xml.transform.Source context)
Evaluates the given expression as a String. |
| Method Detail |
|---|
boolean evaluateAsBoolean(java.lang.String expression,
javax.xml.transform.Source context)
throws XPathException
boolean. Returns the boolean evaluation of the expression, or
false if it is invalid.
expression - the XPath expressioncontext - the context starting point
XPathException - in case of XPath errors
org.w3c.dom.Node evaluateAsNode(java.lang.String expression,
javax.xml.transform.Source context)
throws XPathException
Node. Returns the evaluation of the expression, or null
if it is invalid.
expression - the XPath expressioncontext - the context starting point
XPathException - in case of XPath errors
java.util.List evaluateAsNodeList(java.lang.String expression,
javax.xml.transform.Source context)
throws XPathException
Node objects. Returns the evaluation of the expression, or an
empty list if no results are found.
expression - the XPath expressioncontext - the context starting point
XPathException - in case of XPath errors
double evaluateAsDouble(java.lang.String expression,
javax.xml.transform.Source context)
throws XPathException
double. Returns the evaluation of the expression, or Double.NaN if it is invalid.
expression - the XPath expressioncontext - the context starting point
XPathException - in case of XPath errors
java.lang.String evaluateAsString(java.lang.String expression,
javax.xml.transform.Source context)
throws XPathException
String. Returns the evaluation of the expression, or
null if it is invalid.
expression - the XPath expressioncontext - the context starting point
XPathException - in case of XPath errors
java.lang.Object evaluateAsObject(java.lang.String expression,
javax.xml.transform.Source context,
NodeMapper nodeMapper)
throws XPathException
Node result to a Java object via a NodeMapper.
expression - the XPath expressioncontext - the context starting pointnodeMapper - object that will map one object per node
XPathException - in case of XPath errors
java.util.List evaluate(java.lang.String expression,
javax.xml.transform.Source context,
NodeMapper nodeMapper)
throws XPathException
Node objects to a Java object via a NodeMapper.
expression - the XPath expressioncontext - the context starting pointnodeMapper - object that will map one object per node
XPathException - in case of XPath errors
void evaluate(java.lang.String expression,
javax.xml.transform.Source context,
NodeCallbackHandler callbackHandler)
throws XPathException
Node objects on a per-node basis with a NodeCallbackHandler.
expression - the XPath expressioncontext - the context starting pointcallbackHandler - object that will extract results, one row at a time
XPathException - in case of XPath errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||