public interface XPathHandler
A XPathReader generates callbacks into
an XPathHandler to allow for custom
handling of the parse.
The callbacks very closely match the productions listed in the W3C XPath specification. Gratuitous productions (e.g. Expr/startExpr()/endExpr()) are not included in this API.
| Modifier and Type | Method and Description |
|---|---|
void |
endAbsoluteLocationPath()
Receive notification of the end of an absolute location path expression.
|
void |
endAdditiveExpr(int additiveOperator)
Receive notification of the end of an additive ('+' or '-') expression.
|
void |
endAllNodeStep()
Receive notification of the end of a node() step.
|
void |
endAndExpr(boolean create)
Receive notification of the end of an 'and' expression.
|
void |
endCommentNodeStep()
Receive notification of the end of a comment() step.
|
void |
endEqualityExpr(int equalityOperator)
Receive notification of the end of an equality ('=' or '!=') expression.
|
void |
endFilterExpr()
Receive notification of the end of a filter expression.
|
void |
endFunction()
Receive notification of the end of a function call
|
void |
endMultiplicativeExpr(int multiplicativeOperator)
Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.
|
void |
endNameStep()
Receive notification of the end of a NameStep
|
void |
endOrExpr(boolean create)
Receive notification of the end of an 'or' expression.
|
void |
endPathExpr()
Receive notification of the end of a path expression.
|
void |
endPredicate()
Receive notification of the end of a predicate.
|
void |
endProcessingInstructionNodeStep()
Receive notification of the end of a processing-instruction(...) step.
|
void |
endRelationalExpr(int relationalOperator)
Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.
|
void |
endRelativeLocationPath()
Receive notification of the end of a relative location path expression.
|
void |
endTextNodeStep()
Receive notification of the end of a text() step.
|
void |
endUnaryExpr(int unaryOperator)
Receive notification of the end of a unary ('+' or '-') expression.
|
void |
endUnionExpr(boolean create)
Receive notification of the end of a union ('|') expression.
|
void |
endXPath()
Receive notification of the end of an XPath expression parse.
|
void |
literal(String literal)
Receive notification of a literal expression.
|
void |
number(double number)
Receive notification of a number expression.
|
void |
number(int number)
Receive notification of a number expression.
|
void |
startAbsoluteLocationPath()
Receive notification of the start of an absolute location path expression.
|
void |
startAdditiveExpr()
Receive notification of the start of an additive ('+' or '-') expression.
|
void |
startAllNodeStep(int axis)
Receive notification of the start of a node() step.
|
void |
startAndExpr()
Receive notification of the start of an 'and' expression.
|
void |
startCommentNodeStep(int axis)
Receive notification of the start of a comment() step.
|
void |
startEqualityExpr()
Receive notification of the start of an equality ('=' or '!=') expression.
|
void |
startFilterExpr()
Receive notification of the start of a filter expression.
|
void |
startFunction(String prefix,
String functionName)
Receive notification of a function call.
|
void |
startMultiplicativeExpr()
Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.
|
void |
startNameStep(int axis,
String prefix,
String localName)
Receive notification of the start of a name step.
|
void |
startOrExpr()
Receive notification of the start of an 'or' expression.
|
void |
startPathExpr()
Receive notification of the start of a path expression.
|
void |
startPredicate()
Receive notification of the start of a predicate.
|
void |
startProcessingInstructionNodeStep(int axis,
String name)
Receive notification of the start of a processing-instruction(...) step.
|
void |
startRelationalExpr()
Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.
|
void |
startRelativeLocationPath()
Receive notification of the start of a relative location path expression.
|
void |
startTextNodeStep(int axis)
Receive notification of the start of a text() step.
|
void |
startUnaryExpr()
Receive notification of the start of a unary ('+' or '-') expression.
|
void |
startUnionExpr()
Receive notification of the start of a union ('|') expression.
|
void |
startXPath()
Receive notification of the start of an XPath expression parse.
|
void |
variableReference(String prefix,
String variableName)
Receive notification of a variable-reference expression.
|
void startXPath()
throws SAXPathException
SAXPathExceptionvoid endXPath()
throws SAXPathException
SAXPathExceptionvoid startPathExpr()
throws SAXPathException
SAXPathExceptionvoid endPathExpr()
throws SAXPathException
SAXPathExceptionvoid startAbsoluteLocationPath()
throws SAXPathException
SAXPathExceptionvoid endAbsoluteLocationPath()
throws SAXPathException
SAXPathExceptionvoid startRelativeLocationPath()
throws SAXPathException
SAXPathExceptionvoid endRelativeLocationPath()
throws SAXPathException
SAXPathExceptionvoid startNameStep(int axis,
String prefix,
String localName)
throws SAXPathException
axis - the axis of this stepprefix - the namespace prefix for the name to test,
or the empty string if no prefix is specifiedlocalName - the local part of the name to testSAXPathExceptionvoid endNameStep()
throws SAXPathException
SAXPathExceptionvoid startTextNodeStep(int axis)
throws SAXPathException
axis - the axis of this stepSAXPathExceptionvoid endTextNodeStep()
throws SAXPathException
SAXPathExceptionvoid startCommentNodeStep(int axis)
throws SAXPathException
axis - the axis of this stepSAXPathExceptionvoid endCommentNodeStep()
throws SAXPathException
SAXPathExceptionvoid startAllNodeStep(int axis)
throws SAXPathException
axis - the axis of this stepSAXPathExceptionvoid endAllNodeStep()
throws SAXPathException
SAXPathExceptionvoid startProcessingInstructionNodeStep(int axis,
String name)
throws SAXPathException
axis - the axis of this stepname - the name of the processing-instruction, or
the empty string if none is specifiedSAXPathExceptionvoid endProcessingInstructionNodeStep()
throws SAXPathException
SAXPathExceptionvoid startPredicate()
throws SAXPathException
SAXPathExceptionvoid endPredicate()
throws SAXPathException
SAXPathExceptionvoid startFilterExpr()
throws SAXPathException
SAXPathExceptionvoid endFilterExpr()
throws SAXPathException
SAXPathExceptionvoid startOrExpr()
throws SAXPathException
SAXPathExceptionvoid endOrExpr(boolean create)
throws SAXPathException
create - flag that indicates if this expression
should truly be instantiated, or if it was just
a pass-through, based upon the grammar productionsSAXPathExceptionvoid startAndExpr()
throws SAXPathException
SAXPathExceptionvoid endAndExpr(boolean create)
throws SAXPathException
create - flag that indicates if this expression
should truly be instantiated, or if it was just
a pass-through, based upon the grammar productionsSAXPathExceptionvoid startEqualityExpr()
throws SAXPathException
SAXPathExceptionvoid endEqualityExpr(int equalityOperator)
throws SAXPathException
equalityOperator - the operator specific to this particular
equality expression. If null, this expression
is only a pass-through, and should not actually
be instantiated.SAXPathExceptionvoid startRelationalExpr()
throws SAXPathException
SAXPathExceptionvoid endRelationalExpr(int relationalOperator)
throws SAXPathException
relationalOperator - the operator specific to this particular
relational expression. If NO_OP, this expression
is only a pass-through, and should not actually
be instantiated.SAXPathExceptionvoid startAdditiveExpr()
throws SAXPathException
SAXPathExceptionvoid endAdditiveExpr(int additiveOperator)
throws SAXPathException
additiveOperator - the operator specific to this particular
additive expression. If NO_OP, this expression
is only a pass-through, and should not actually
be instantiated.SAXPathExceptionvoid startMultiplicativeExpr()
throws SAXPathException
SAXPathExceptionvoid endMultiplicativeExpr(int multiplicativeOperator)
throws SAXPathException
multiplicativeOperator - the operator specific to this particular
multiplicative expression. If null, this expression
is only a pass-through, and should not actually
be instantiated.SAXPathExceptionvoid startUnaryExpr()
throws SAXPathException
SAXPathExceptionvoid endUnaryExpr(int unaryOperator)
throws SAXPathException
unaryOperator - the operator specific to this particular
unary expression. If NO_OP, this expression is only
a pass-through, and should not actually be instantiated.
If not Operator.NO_OP, it will
always be Operator.NEGATIVE.SAXPathExceptionvoid startUnionExpr()
throws SAXPathException
SAXPathExceptionvoid endUnionExpr(boolean create)
throws SAXPathException
create - flag that indicates if this expression
should truly be instantiated, or if it was just
a pass-through, based upon the grammar productionsSAXPathExceptionvoid number(int number)
throws SAXPathException
number - the number valueSAXPathExceptionvoid number(double number)
throws SAXPathException
number - the number valueSAXPathExceptionvoid literal(String literal) throws SAXPathException
literal - the string literal valueSAXPathExceptionvoid variableReference(String prefix, String variableName) throws SAXPathException
prefix - the namespace prefix of the variablevariableName - the local name of the variableSAXPathExceptionvoid startFunction(String prefix, String functionName) throws SAXPathException
prefix - the namespace prefix of the functionfunctionName - the local name of the functionSAXPathExceptionvoid endFunction()
throws SAXPathException
SAXPathExceptionCopyright © 2001-2012 Codehaus. All Rights Reserved.