public class XPathReader extends java.lang.Object implements XPathReader
XPathReader which
generates callbacks to an XPathHandler.| Modifier and Type | Field and Description |
|---|---|
private static XPathHandler |
defaultHandler |
private XPathHandler |
handler |
private XPathLexer |
lexer |
private java.util.ArrayList |
tokens |
| Constructor and Description |
|---|
XPathReader()
Create a new
XPathReader with a do-nothing
XPathHandler. |
| Modifier and Type | Method and Description |
|---|---|
private void |
abbrStep() |
private void |
absoluteLocationPath() |
private void |
additiveExpr() |
private void |
andExpr() |
private void |
arguments() |
private int |
axisSpecifier() |
private XPathSyntaxException |
createSyntaxException(java.lang.String message) |
private void |
equalityExpr() |
private void |
expr() |
private void |
filterExpr() |
private void |
functionCall() |
XPathHandler |
getXPathHandler()
Retrieve the current
XPathHandler
which receives the event callbacks. |
private boolean |
isNodeTypeName(Token name) |
private int |
LA(int position) |
private void |
literal() |
(package private) void |
locationPath(boolean isAbsolute) |
private Token |
LT(int position) |
private Token |
match(int tokenType) |
private void |
multiplicativeExpr() |
private void |
nameTest(int axis) |
private void |
nodeTest(int axis) |
private void |
nodeTypeTest(int axis) |
private void |
orExpr() |
void |
parse(java.lang.String xpath)
Parse an XPath expression,
and send event callbacks to an
XPathHandler. |
private void |
pathExpr() |
(package private) void |
predicate() |
private void |
predicateExpr() |
private void |
predicates() |
private void |
relationalExpr() |
private void |
relativeLocationPath() |
(package private) void |
setUpParse(java.lang.String xpath) |
void |
setXPathHandler(XPathHandler handler)
Set the
XPathHandler to receive
event callbacks during the parse. |
(package private) void |
step() |
private void |
steps() |
private void |
throwInvalidAxis(java.lang.String invalidAxis) |
private void |
unaryExpr() |
private void |
unionExpr() |
private void |
variableReference() |
private java.util.ArrayList tokens
private XPathLexer lexer
private XPathHandler handler
private static XPathHandler defaultHandler
public XPathReader()
XPathReader with a do-nothing
XPathHandler.public void setXPathHandler(XPathHandler handler)
SAXPathEventSourceXPathHandler to receive
event callbacks during the parse.setXPathHandler in interface SAXPathEventSourcehandler - the handler to receive callbackspublic XPathHandler getXPathHandler()
SAXPathEventSourceXPathHandler
which receives the event callbacks.getXPathHandler in interface SAXPathEventSourceXPathHandlerpublic void parse(java.lang.String xpath)
throws SAXPathException
XPathReaderXPathHandler.parse in interface XPathReaderxpath - the textual XPath expression to parseSAXPathException - if the expression is syntactically incorrectvoid setUpParse(java.lang.String xpath)
private void pathExpr()
throws SAXPathException
SAXPathExceptionprivate void literal()
throws SAXPathException
SAXPathExceptionprivate void functionCall()
throws SAXPathException
SAXPathExceptionprivate void arguments()
throws SAXPathException
SAXPathExceptionprivate void filterExpr()
throws SAXPathException
SAXPathExceptionprivate void variableReference()
throws SAXPathException
SAXPathExceptionvoid locationPath(boolean isAbsolute)
throws SAXPathException
SAXPathExceptionprivate void absoluteLocationPath()
throws SAXPathException
SAXPathExceptionprivate void relativeLocationPath()
throws SAXPathException
SAXPathExceptionprivate void steps()
throws SAXPathException
SAXPathExceptionvoid step()
throws SAXPathException
SAXPathExceptionprivate int axisSpecifier()
throws SAXPathException
SAXPathExceptionprivate void nodeTest(int axis)
throws SAXPathException
SAXPathExceptionprivate void nodeTypeTest(int axis)
throws SAXPathException
SAXPathExceptionprivate void nameTest(int axis)
throws SAXPathException
SAXPathExceptionprivate void abbrStep()
throws SAXPathException
SAXPathExceptionprivate void predicates()
throws SAXPathException
SAXPathExceptionvoid predicate()
throws SAXPathException
SAXPathExceptionprivate void predicateExpr()
throws SAXPathException
SAXPathExceptionprivate void expr()
throws SAXPathException
SAXPathExceptionprivate void orExpr()
throws SAXPathException
SAXPathExceptionprivate void andExpr()
throws SAXPathException
SAXPathExceptionprivate void equalityExpr()
throws SAXPathException
SAXPathExceptionprivate void relationalExpr()
throws SAXPathException
SAXPathExceptionprivate void additiveExpr()
throws SAXPathException
SAXPathExceptionprivate void multiplicativeExpr()
throws SAXPathException
SAXPathExceptionprivate void unaryExpr()
throws SAXPathException
SAXPathExceptionprivate void unionExpr()
throws SAXPathException
SAXPathExceptionprivate Token match(int tokenType) throws XPathSyntaxException
XPathSyntaxExceptionprivate int LA(int position)
private Token LT(int position)
private boolean isNodeTypeName(Token name)
private XPathSyntaxException createSyntaxException(java.lang.String message)
private void throwInvalidAxis(java.lang.String invalidAxis)
throws SAXPathException
SAXPathException