org.exolab.adaptx.xpath
Interface XPathExpression
- BinaryExpr, EqualityExpr, FilterExpr, GroupedExpression, LocationStep, NodeExpression, PathComponent
- AbstractPathComponent, BooleanFunctionCall, Concat, Contains, CountFunctionCall, ErrorExpr, ErrorFunctionCall, ExtensionFunctionCall, FalseFunctionCall, FormatNumber, FunctionCall, FunctionCallImpl, IdFunctionCall, IdRefFunctionCall, LangFunctionCall, LastFunctionCall, Normalize, NotFunctionCall, NumberFunctionCall, PathExpr, PositionFunctionCall, PredicateExpr, PrimaryExpr, SelectExpr, StartsWith, StringFunctionCall, StringLength, Substring, SubstringAfter, SubstringBefore, SumFunctionCall, TextFunctionCall, Translate, TrueFunctionCall, UnionExpr, VariableReference, XMLNamesFunctionCall
public interface XPathExpression
Interface representing an XPath expression. An XPath expression
is thread-safe and can be evaluated multiple times concurrently.
It is a compiled version of the textual XPath expression and can be
cached for later use.
static short | BOOLEAN - The Boolean expression type.
|
static short | ERROR - Expression of type error.
|
static short | FILTER_EXPR - The FilterExpr expression type.
|
static short | LOCATION_PATH - The LocationPath expression type.
|
static short | NODE_TEST - The NodeTest expressions type
|
static short | NUMBER - The NodeTest expressions type
|
static short | PATH_EXPR - The PathExpr expression type.
|
static short | PRIMARY - The Primary expression type.
|
static short | STEP - The Step expression type.
|
static short | STRING - The String expression type.
|
static short | UNION_EXPR - The union expression type.
|
BOOLEAN
public static final short BOOLEAN
The Boolean expression type.
ERROR
public static final short ERROR
Expression of type error.
FILTER_EXPR
public static final short FILTER_EXPR
The FilterExpr expression type.
LOCATION_PATH
public static final short LOCATION_PATH
The LocationPath expression type.
NODE_TEST
public static final short NODE_TEST
The NodeTest expressions type
NUMBER
public static final short NUMBER
The NodeTest expressions type
PATH_EXPR
public static final short PATH_EXPR
The PathExpr expression type.
PRIMARY
public static final short PRIMARY
The Primary expression type.
STEP
public static final short STEP
The Step expression type.
STRING
public static final short STRING
The String expression type.
UNION_EXPR
public static final short UNION_EXPR
The union expression type.
evaluate
public XPathResult evaluate(XPathContext context)
throws XPathException
Evaluates the expression and returns the XPath result.
context
- The XPathContext to use during evaluation.
- The XPathResult (not null).
XPathException
- if an error occured while
evaluating this expression.
getExprType
public short getExprType()
Returns the type of this expression.
- The type of this expression
toString
public String toString()
Returns the XPath expression as a string. The returned value is
a valid XPath expression that can be parsed into an equivalent
XPathExpression
object.
- The XPath expression as a string