javax.xml.xpath

Interface XPathExpression

Known Implementing Classes:
AndExpr, Constant, Expr, FunctionCall, IdFunction, OrExpr, Pattern, Root, Selector, Steps, UnionExpr, VariableReference

public interface XPathExpression

An XPath expression.

Since:
1.3

Method Summary

String
evaluate(Object item)
Evaluates this expression against the specified context, returning the result as a string.
Object
evaluate(Object item, QName returnType)
Evaluates this expression against the specified context.
String
evaluate(InputSource source)
Evaluates this expression against the specified context, returning the result as a string.
Object
evaluate(InputSource source, QName returnType)
Evaluates this expression against the specified context.

Method Details

evaluate

public String evaluate(Object item)
            throws XPathExpressionException
Evaluates this expression against the specified context, returning the result as a string.

Parameters:
item - the evaluation context


evaluate

public Object evaluate(Object item,
                       QName returnType)
            throws XPathExpressionException
Evaluates this expression against the specified context.

Parameters:
item - the evaluation context
returnType - the desired return type


evaluate

public String evaluate(InputSource source)
            throws XPathExpressionException
Evaluates this expression against the specified context, returning the result as a string.

Parameters:
source - the source to load the context from


evaluate

public Object evaluate(InputSource source,
                       QName returnType)
            throws XPathExpressionException
Evaluates this expression against the specified context.

Parameters:
source - the source to load the context from
returnType - the desired return type