|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XPathExpression
Defines the contract for a precompiled XPath expression. Concrete instances can be obtained through the XPathExpressionFactory
.
XPathOperations
implementations.
Method Summary | |
---|---|
java.util.List |
evaluate(org.w3c.dom.Node node,
NodeMapper nodeMapper)
Evaluates the given expression, mapping each result Node objects to a Java object via a NodeMapper . |
boolean |
evaluateAsBoolean(org.w3c.dom.Node node)
Evaluates the given expression as a boolean . |
org.w3c.dom.Node |
evaluateAsNode(org.w3c.dom.Node node)
Evaluates the given expression as a Node . |
java.util.List |
evaluateAsNodeList(org.w3c.dom.Node node)
Evaluates the given expression, and returns all Node objects that conform to it. |
double |
evaluateAsNumber(org.w3c.dom.Node node)
Evaluates the given expression as a number ( double ). |
java.lang.Object |
evaluateAsObject(org.w3c.dom.Node node,
NodeMapper nodeMapper)
Evaluates the given expression, mapping a single Node result to a Java object via a NodeMapper . |
java.lang.String |
evaluateAsString(org.w3c.dom.Node node)
Evaluates the given expression as a String. |
Method Detail |
---|
boolean evaluateAsBoolean(org.w3c.dom.Node node) throws XPathException
boolean
. Returns the boolean evaluation of the expression, or
false
if it is invalid.
node
- the starting point
XPathException
- in case of XPath errorsorg.w3c.dom.Node evaluateAsNode(org.w3c.dom.Node node) throws XPathException
Node
. Returns the evaluation of the expression, or null
if it is invalid.
node
- the starting point
XPathException
- in case of XPath errorsjava.util.List evaluateAsNodeList(org.w3c.dom.Node node) throws XPathException
Node
objects that conform to it. Returns an empty list if
no result could be found.
node
- the starting point
Node
s that are selected by the expression
XPathException
- in case of XPath errorsdouble evaluateAsNumber(org.w3c.dom.Node node) throws XPathException
double
). Returns the numeric evaluation of the
expression, or Double.NaN
if it is invalid.
node
- the starting point
XPathException
- in case of XPath errorsjava.lang.String evaluateAsString(org.w3c.dom.Node node) throws XPathException
null
if no result could be found.
node
- the starting point
XPathException
- in case of XPath errorsjava.lang.Object evaluateAsObject(org.w3c.dom.Node node, NodeMapper nodeMapper) throws XPathException
Node
result to a Java object via a NodeMapper
.
node
- the starting pointnodeMapper
- object that will map one object per node
XPathException
- in case of XPath errorsjava.util.List evaluate(org.w3c.dom.Node node, NodeMapper nodeMapper) throws XPathException
Node
objects to a Java object via a NodeMapper
.
node
- the starting pointnodeMapper
- object that will map one object per node
XPathException
- in case of XPath errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |