Interface NodeExpression
- All Superinterfaces:
MatchExpression
,XPathExpression
Represents an XPath node expression.
- Author:
- Keith Visco
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final short
The node expression type that selects or matches "any" node.static final short
The node expression type that selects or matches attribute nodesstatic final short
The node expression type that selects or matches comment nodesstatic final short
The node expression type that selects or matches element nodesstatic final short
The node expression type that selects or matches any element node with a specific IDstatic final short
The node expression type that selects or matches the current context nodestatic final short
The node expression type that selects or matches namespace nodesstatic final short
The node expression type that selects or matches the parent node of the current context node.static final short
The node expression type that selects or matches Processing Instruction nodesstatic final short
The node expression type that selects or matches text nodesstatic final short
The node expression type that selects or matches any element nodeFields inherited from interface org.exolab.adaptx.xpath.XPathExpression
BOOLEAN, ERROR, FILTER_EXPR, LOCATION_PATH, NODE_TEST, NUMBER, PATH_EXPR, PRIMARY, STEP, STRING, UNION_EXPR
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the QName matched by this NodeExpression.short
Returns the type of this Node exprression, the value must be one of the value Node expression types.boolean
matches
(XPathNode node, XPathContext context) Determines if the given node is matched by this MatchExpr with respect to the given context.Methods inherited from interface org.exolab.adaptx.xpath.XPathExpression
evaluate, getExprType, toString
-
Field Details
-
ANY_EXPR
static final short ANY_EXPRThe node expression type that selects or matches "any" node.- See Also:
-
ATTRIBUTE_EXPR
static final short ATTRIBUTE_EXPRThe node expression type that selects or matches attribute nodes- See Also:
-
ELEMENT_EXPR
static final short ELEMENT_EXPRThe node expression type that selects or matches element nodes- See Also:
-
ID_EXPR
static final short ID_EXPRThe node expression type that selects or matches any element node with a specific ID- See Also:
-
IDENTITY_EXPR
static final short IDENTITY_EXPRThe node expression type that selects or matches the current context node- See Also:
-
PARENT_EXPR
static final short PARENT_EXPRThe node expression type that selects or matches the parent node of the current context node.- See Also:
-
TEXT_EXPR
static final short TEXT_EXPRThe node expression type that selects or matches text nodes- See Also:
-
COMMENT_EXPR
static final short COMMENT_EXPRThe node expression type that selects or matches comment nodes- See Also:
-
PI_EXPR
static final short PI_EXPRThe node expression type that selects or matches Processing Instruction nodes- See Also:
-
WILDCARD_EXPR
static final short WILDCARD_EXPRThe node expression type that selects or matches any element node- See Also:
-
NAMESPACE_EXPR
static final short NAMESPACE_EXPRThe node expression type that selects or matches namespace nodes- See Also:
-
-
Method Details
-
getNodeExprType
short getNodeExprType()Returns the type of this Node exprression, the value must be one of the value Node expression types.- Returns:
- the type of this Node expression
-
getName
String getName()Returns the QName matched by this NodeExpression. The value may be null, for example if this is a TEXT_EXPR or a WILDCARD_EXPR.- Returns:
- the QName matched by this NodeExpression.
-
matches
Determines if the given node is matched by this MatchExpr with respect to the given context.- Specified by:
matches
in interfaceMatchExpression
- Parameters:
node
- the node to determine a match forcontext
- the XPathContext- Returns:
- true if the given node is matched by this MatchExpr
- Throws:
XPathException
- when an error occurs during evaluation
-