org.exolab.adaptx.xpath
Interface XPathExpression
- BinaryExpr, EqualityExpr, LocationStep, NodeExpression, PathComponent
- BooleanFunctionCall, Concat, Contains, CountFunctionCall, ErrorExpr, ErrorFunctionCall, ExtensionFunctionCall, FalseFunctionCall, FilterBase, FormatNumber, FunctionCall, FunctionCallImpl, IdFunctionCall, IdRefFunctionCall, LangFunctionCall, LastFunctionCall, Normalize, NotFunctionCall, NumberFunctionCall, PathExpr, PositionFunctionCall, PredicateExpr, PrimaryExpr, PrimaryExpr, SelectExpr, StartsWith, StringFunctionCall, StringLength, Substring, SubstringAfter, SubstringBefore, SumFunctionCall, TextFunctionCall, Translate, TrueFunctionCall, UnionExpr, 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.
Version:
- Keith Visco
- Assaf Arkin
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.
- 0
ERROR
public static final short ERROR
Expression of type error.
- -1
FILTER_EXPR
public static final short FILTER_EXPR
The FilterExpr expression type.
- 1
LOCATION_PATH
public static final short LOCATION_PATH
The LocationPath expression type.
- 2
NODE_TEST
public static final short NODE_TEST
The NodeTest expressions type
- 3
NUMBER
public static final short NUMBER
The NodeTest expressions type
- 4
PATH_EXPR
public static final short PATH_EXPR
The PathExpr expression type.
- 5
PRIMARY
public static final short PRIMARY
The Primary expression type.
- 6
STEP
public static final short STEP
The Step expression type.
- 7
STRING
public static final short STRING
The String expression type.
- 8
UNION_EXPR
public static final short UNION_EXPR
The union expression type.
- 9
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