|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface to a compiled XPath expression.
Note: Once JET moves to Java 1.5 or later only, this interface will be migrated to javax.xml.xpath.XPathExpression
Method Summary | |
Object |
evaluate(Object contextObject)
Evaluate the expression and return the 'natural' result of the expression. |
boolean |
evaluateAsBoolean(Object contextObject)
Evaluate the expression and convert the result to a boolean using the XPath boolean function. |
NodeSet |
evaluateAsNodeSet(Object contextObject)
Evaluate the expression and return the result as a Node set. |
double |
evaluateAsNumber(Object contextObject)
Evaluate the expression and convert the result to a number using the XPath number function. |
Object |
evaluateAsSingleNode(Object contextObject)
Evaluate the expression using XPathExpression.evaluateAsNodeSet(Object) and then return the first object in
the node set. |
String |
evaluateAsString(Object contextObject)
Evaluate the expression and convert the result to a String using the XPath String function |
Method Detail |
public String evaluateAsString(Object contextObject) throws XPathRuntimeException
contextObject
- the context object for the expression
XPathRuntimeException
- if an evaluation error occuresXPathUtil#xpathString(Object)
public boolean evaluateAsBoolean(Object contextObject) throws XPathRuntimeException
contextObject
- the context object for the expression
XPathRuntimeException
- if an evaluation error occuresXPathUtil.xpathBoolean(Object)
public double evaluateAsNumber(Object contextObject) throws XPathRuntimeException
contextObject
- the context object for the expression.
XPathRuntimeException
- if an evaluation error occuresXPathUtil.xpathNumber(Object)
public NodeSet evaluateAsNodeSet(Object contextObject) throws XPathRuntimeException
contextObject
- the context object for the expression.
XPathRuntimeException
- if an evaluation error occurespublic Object evaluateAsSingleNode(Object contextObject) throws XPathRuntimeException
XPathExpression.evaluateAsNodeSet(Object)
and then return the first object in
the node set. An exception is thrown if the expression cannot be converted to a node set.
If the resulting node set is empty, then null is returned.
contextObject
- the context object for the expression.
null
if the node set is empty.
XPathRuntimeException
- if an evaluation error occurespublic Object evaluate(Object contextObject) throws XPathRuntimeException
contextObject
- the context object for the expression.
XPathRuntimeException
- if an evaluation error occures
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |