|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XPathExpression
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 | |
---|---|
java.lang.Object |
evaluate(java.lang.Object contextObject)
Evaluate the expression and return the 'natural' result of the expression. |
boolean |
evaluateAsBoolean(java.lang.Object contextObject)
Evaluate the expression and convert the result to a boolean using the XPath boolean function. |
NodeSet |
evaluateAsNodeSet(java.lang.Object contextObject)
Evaluate the expression and return the result as a Node set. |
double |
evaluateAsNumber(java.lang.Object contextObject)
Evaluate the expression and convert the result to a number using the XPath number function. |
java.lang.Object |
evaluateAsSingleNode(java.lang.Object contextObject)
Evaluate the expression using evaluateAsNodeSet(Object) and then return the first object in
the node set. |
java.lang.String |
evaluateAsString(java.lang.Object contextObject)
Evaluate the expression and convert the result to a String using the XPath String function |
Method Detail |
---|
java.lang.String evaluateAsString(java.lang.Object contextObject) throws XPathRuntimeException
contextObject
- the context object for the expression
XPathRuntimeException
- if an evaluation error occuresXPathUtil.xpathString(Object)
boolean evaluateAsBoolean(java.lang.Object contextObject) throws XPathRuntimeException
contextObject
- the context object for the expression
XPathRuntimeException
- if an evaluation error occuresXPathUtil.xpathBoolean(Object)
double evaluateAsNumber(java.lang.Object contextObject) throws XPathRuntimeException
contextObject
- the context object for the expression.
XPathRuntimeException
- if an evaluation error occuresXPathUtil.xpathNumber(Object)
NodeSet evaluateAsNodeSet(java.lang.Object contextObject) throws XPathRuntimeException
contextObject
- the context object for the expression.
XPathRuntimeException
- if an evaluation error occuresjava.lang.Object evaluateAsSingleNode(java.lang.Object contextObject) throws XPathRuntimeException
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 occuresjava.lang.Object evaluate(java.lang.Object contextObject) throws XPathRuntimeException
String
Boolean
Number
NodeSet
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 |