org.jaxen.saxpath.base
Class XPathReader
java.lang.Object
org.jaxen.saxpath.base.XPathReader
- All Implemented Interfaces:
- TokenTypes, SAXPathEventSource, XPathReader
public class XPathReader
- extends java.lang.Object
- implements XPathReader, TokenTypes
Implementation of SAXPath's XPathReader which
generates callbacks to an XPathHandler.
- Author:
- bob mcwhirter (bob@werken.com)
| Fields inherited from interface org.jaxen.saxpath.base.TokenTypes |
AND, AT, COLON, COMMA, DIV, DOLLAR, DOT, DOT_DOT, DOUBLE, DOUBLE_COLON, DOUBLE_SLASH, EOF, EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, IDENTIFIER, INTEGER, LEFT_BRACKET, LEFT_PAREN, LESS_THAN, LESS_THAN_EQUALS, LITERAL, MINUS, MOD, NOT, NOT_EQUALS, OR, PIPE, PLUS, RIGHT_BRACKET, RIGHT_PAREN, SKIP, SLASH, STAR |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tokens
private java.util.LinkedList tokens
lexer
private XPathLexer lexer
handler
private XPathHandler handler
XPathReader
public XPathReader()
setXPathHandler
public void setXPathHandler(XPathHandler handler)
- Description copied from interface:
SAXPathEventSource
- Set the
XPathHandler to receive
event callbacks during the parse.
- Specified by:
setXPathHandler in interface SAXPathEventSource
- Parameters:
handler - The handler to receive callbacks.
getXPathHandler
public XPathHandler getXPathHandler()
- Description copied from interface:
SAXPathEventSource
- Retrieve the current
XPathHandler
which receives the event callbacks.
- Specified by:
getXPathHandler in interface SAXPathEventSource
- Returns:
- The currently installed
XPathHandler.
parse
public void parse(java.lang.String xpath)
throws SAXPathException
- Description copied from interface:
XPathReader
- Perform parsing of the textual XPath expression,
and produce event callbacks to an
XPathHandler.
- Specified by:
parse in interface XPathReader
- Parameters:
xpath - The textual XPath expression to parse.
- Throws:
SAXPathException - In the event an error occurs.
setUpParse
void setUpParse(java.lang.String xpath)
pathExpr
void pathExpr()
throws SAXPathException
- Throws:
SAXPathException
numberDouble
void numberDouble()
throws SAXPathException
- Throws:
SAXPathException
numberInteger
void numberInteger()
throws SAXPathException
- Throws:
SAXPathException
literal
void literal()
throws SAXPathException
- Throws:
SAXPathException
functionCall
void functionCall()
throws SAXPathException
- Throws:
SAXPathException
arguments
void arguments()
throws SAXPathException
- Throws:
SAXPathException
filterExpr
void filterExpr()
throws SAXPathException
- Throws:
SAXPathException
variableReference
void variableReference()
throws SAXPathException
- Throws:
SAXPathException
locationPath
void locationPath(boolean isAbsolute)
throws SAXPathException
- Throws:
SAXPathException
absoluteLocationPath
void absoluteLocationPath()
throws SAXPathException
- Throws:
SAXPathException
relativeLocationPath
void relativeLocationPath()
throws SAXPathException
- Throws:
SAXPathException
steps
void steps()
throws SAXPathException
- Throws:
SAXPathException
step
void step(boolean first)
throws SAXPathException
- Throws:
SAXPathException
axisSpecifier
int axisSpecifier()
throws SAXPathException
- Throws:
SAXPathException
nodeTest
void nodeTest(int axis)
throws SAXPathException
- Throws:
SAXPathException
nodeTypeTest
void nodeTypeTest(int axis)
throws SAXPathException
- Throws:
SAXPathException
nameTest
void nameTest(int axis)
throws SAXPathException
- Throws:
SAXPathException
abbrStep
void abbrStep()
throws SAXPathException
- Throws:
SAXPathException
predicates
void predicates()
throws SAXPathException
- Throws:
SAXPathException
predicate
void predicate()
throws SAXPathException
- Throws:
SAXPathException
predicateExpr
void predicateExpr()
throws SAXPathException
- Throws:
SAXPathException
expr
void expr()
throws SAXPathException
- Throws:
SAXPathException
orExpr
void orExpr()
throws SAXPathException
- Throws:
SAXPathException
andExpr
void andExpr()
throws SAXPathException
- Throws:
SAXPathException
equalityExpr
void equalityExpr()
throws SAXPathException
- Throws:
SAXPathException
relationalExpr
void relationalExpr()
throws SAXPathException
- Throws:
SAXPathException
additiveExpr
void additiveExpr()
throws SAXPathException
- Throws:
SAXPathException
multiplicativeExpr
void multiplicativeExpr()
throws SAXPathException
- Throws:
SAXPathException
unaryExpr
void unaryExpr()
throws SAXPathException
- Throws:
SAXPathException
unionExpr
void unionExpr()
throws SAXPathException
- Throws:
SAXPathException
match
Token match(int tokenType)
LA
int LA(int position)
LT
Token LT(int position)
isNodeTypeName
boolean isNodeTypeName(Token name)
throwSyntaxException
void throwSyntaxException(java.lang.String message)
throws SAXPathException
- Throws:
SAXPathException
throwInvalidAxis
void throwInvalidAxis(java.lang.String invalidAxis)
throws SAXPathException
- Throws:
SAXPathException
throwUnexpected
void throwUnexpected()
throws SAXPathException
- Throws:
SAXPathException