Package org.jaxen.saxpath.base
Class XPathReader
java.lang.Object
org.jaxen.saxpath.base.XPathReader
- All Implemented Interfaces:
SAXPathEventSource
,XPathReader
Implementation of SAXPath's
XPathReader
which
generates callbacks to an XPathHandler
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static XPathHandler
private XPathHandler
private XPathLexer
private ArrayList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
abbrStep()
private void
private void
private void
andExpr()
private void
private int
private XPathSyntaxException
createSyntaxException
(String message) private void
private void
expr()
private void
private void
Retrieve the currentXPathHandler
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
private void
nameTest
(int axis) private void
nodeTest
(int axis) private void
nodeTypeTest
(int axis) private void
orExpr()
void
Parse an XPath expression, and send event callbacks to anXPathHandler
.private void
pathExpr()
(package private) void
private void
private void
private void
private void
(package private) void
setUpParse
(String xpath) void
setXPathHandler
(XPathHandler handler) Set theXPathHandler
to receive event callbacks during the parse.(package private) void
step()
private void
steps()
private void
throwInvalidAxis
(String invalidAxis) private void
private void
private void
-
Field Details
-
tokens
-
lexer
-
handler
-
defaultHandler
-
-
Constructor Details
-
XPathReader
public XPathReader()Create a newXPathReader
with a do-nothingXPathHandler
.
-
-
Method Details
-
setXPathHandler
Description copied from interface:SAXPathEventSource
Set theXPathHandler
to receive event callbacks during the parse.- Specified by:
setXPathHandler
in interfaceSAXPathEventSource
- Parameters:
handler
- the handler to receive callbacks
-
getXPathHandler
Description copied from interface:SAXPathEventSource
Retrieve the currentXPathHandler
which receives the event callbacks.- Specified by:
getXPathHandler
in interfaceSAXPathEventSource
- Returns:
- the currently installed
XPathHandler
-
parse
Description copied from interface:XPathReader
Parse an XPath expression, and send event callbacks to anXPathHandler
.- Specified by:
parse
in interfaceXPathReader
- Parameters:
xpath
- the textual XPath expression to parse- Throws:
SAXPathException
- if the expression is syntactically incorrect
-
setUpParse
-
pathExpr
- Throws:
SAXPathException
-
literal
- Throws:
SAXPathException
-
functionCall
- Throws:
SAXPathException
-
arguments
- Throws:
SAXPathException
-
filterExpr
- Throws:
SAXPathException
-
variableReference
- Throws:
SAXPathException
-
locationPath
- Throws:
SAXPathException
-
absoluteLocationPath
- Throws:
SAXPathException
-
relativeLocationPath
- Throws:
SAXPathException
-
steps
- Throws:
SAXPathException
-
step
- Throws:
SAXPathException
-
axisSpecifier
- Throws:
SAXPathException
-
nodeTest
- Throws:
SAXPathException
-
nodeTypeTest
- Throws:
SAXPathException
-
nameTest
- Throws:
SAXPathException
-
abbrStep
- Throws:
SAXPathException
-
predicates
- Throws:
SAXPathException
-
predicate
- Throws:
SAXPathException
-
predicateExpr
- Throws:
SAXPathException
-
expr
- Throws:
SAXPathException
-
orExpr
- Throws:
SAXPathException
-
andExpr
- Throws:
SAXPathException
-
equalityExpr
- Throws:
SAXPathException
-
relationalExpr
- Throws:
SAXPathException
-
additiveExpr
- Throws:
SAXPathException
-
multiplicativeExpr
- Throws:
SAXPathException
-
unaryExpr
- Throws:
SAXPathException
-
unionExpr
- Throws:
SAXPathException
-
match
- Throws:
XPathSyntaxException
-
LA
private int LA(int position) -
LT
-
isNodeTypeName
-
createSyntaxException
-
throwInvalidAxis
- Throws:
SAXPathException
-