| org.springframework.xml.xpath.XPathOperations
All known Subclasses: org.springframework.xml.xpath.AbstractXPathTemplate,
XPathOperations | public interface XPathOperations (Code) | | 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 the
XPathExpressionFactory or the
XPathExpressionFactoryBean for optimal performance, but less flexibility.
author: Arjen Poutsma See Also: Jaxp13XPathTemplate See Also: JaxenXPathTemplate since: 1.0.0 |
Method Summary | |
List | evaluate(String expression, Source context, NodeMapper nodeMapper) Evaluates the given expression, mapping each result
Node objects to a Java object via a
NodeMapper . | void | evaluate(String expression, Source context, NodeCallbackHandler callbackHandler) Evaluates the given expression, handling the result
Node objects on a per-node basis with a
NodeCallbackHandler . | boolean | evaluateAsBoolean(String expression, Source context) Evaluates the given expression as a boolean . | double | evaluateAsDouble(String expression, Source context) Evaluates the given expression as a double . | Node | evaluateAsNode(String expression, Source context) Evaluates the given expression as a
Node . | List | evaluateAsNodeList(String expression, Source context) Evaluates the given expression as a list of
Node objects. | Object | evaluateAsObject(String expression, Source context, NodeMapper nodeMapper) Evaluates the given expression, mapping a single
Node result to a Java object via a
NodeMapper . | String | evaluateAsString(String expression, Source context) Evaluates the given expression as a
String . |
evaluate | List evaluate(String expression, Source context, NodeMapper nodeMapper) throws XPathException(Code) | | Evaluates the given expression, mapping each result
Node objects to a Java object via a
NodeMapper .
Parameters: expression - the XPath expression Parameters: context - the context starting point Parameters: nodeMapper - object that will map one object per node the result list, containing mapped objects throws: XPathException - in case of XPath errors See Also: XPath specification |
evaluateAsBoolean | boolean evaluateAsBoolean(String expression, Source context) throws XPathException(Code) | | Evaluates the given expression as a boolean . Returns the boolean evaluation of the expression, or
false if it is invalid.
Parameters: expression - the XPath expression Parameters: context - the context starting point the result of the evaluation throws: XPathException - in case of XPath errors See Also: XPath specification |
evaluateAsDouble | double evaluateAsDouble(String expression, Source context) throws XPathException(Code) | | Evaluates the given expression as a double . Returns the evaluation of the expression, or
Double.NaN if it is invalid.
Parameters: expression - the XPath expression Parameters: context - the context starting point the result of the evaluation throws: XPathException - in case of XPath errors See Also: XPath specification |
evaluateAsNode | Node evaluateAsNode(String expression, Source context) throws XPathException(Code) | | Evaluates the given expression as a
Node . Returns the evaluation of the expression, or null
if it is invalid.
Parameters: expression - the XPath expression Parameters: context - the context starting point the result of the evaluation throws: XPathException - in case of XPath errors See Also: XPath specification |
evaluateAsNodeList | List evaluateAsNodeList(String expression, Source context) throws XPathException(Code) | | Evaluates the given expression as a list of
Node objects. Returns the evaluation of the expression, or an
empty list if no results are found.
Parameters: expression - the XPath expression Parameters: context - the context starting point the result of the evaluation throws: XPathException - in case of XPath errors See Also: XPath specification |
evaluateAsObject | Object evaluateAsObject(String expression, Source context, NodeMapper nodeMapper) throws XPathException(Code) | | Evaluates the given expression, mapping a single
Node result to a Java object via a
NodeMapper .
Parameters: expression - the XPath expression Parameters: context - the context starting point Parameters: nodeMapper - object that will map one object per node the single mapped object throws: XPathException - in case of XPath errors See Also: XPath specification |
evaluateAsString | String evaluateAsString(String expression, Source context) throws XPathException(Code) | | Evaluates the given expression as a
String . Returns the evaluation of the expression, or
null if it is invalid.
Parameters: expression - the XPath expression Parameters: context - the context starting point the result of the evaluation throws: XPathException - in case of XPath errors See Also: XPath specification |
|
|