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 XPathHandlerprivate XPathHandlerprivate XPathLexerprivate ArrayList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidabbrStep()private voidprivate voidprivate voidandExpr()private voidprivate intprivate XPathSyntaxExceptioncreateSyntaxException(String message) private voidprivate voidexpr()private voidprivate voidRetrieve the currentXPathHandlerwhich receives the event callbacks.private booleanisNodeTypeName(Token name) private intLA(int position) private voidliteral()(package private) voidlocationPath(boolean isAbsolute) private TokenLT(int position) private Tokenmatch(int tokenType) private voidprivate voidnameTest(int axis) private voidnodeTest(int axis) private voidnodeTypeTest(int axis) private voidorExpr()voidParse an XPath expression, and send event callbacks to anXPathHandler.private voidpathExpr()(package private) voidprivate voidprivate voidprivate voidprivate void(package private) voidsetUpParse(String xpath) voidsetXPathHandler(XPathHandler handler) Set theXPathHandlerto receive event callbacks during the parse.(package private) voidstep()private voidsteps()private voidthrowInvalidAxis(String invalidAxis) private voidprivate voidprivate void
-
Field Details
-
tokens
-
lexer
-
handler
-
defaultHandler
-
-
Constructor Details
-
XPathReader
public XPathReader()Create a newXPathReaderwith a do-nothingXPathHandler.
-
-
Method Details
-
setXPathHandler
Description copied from interface:SAXPathEventSourceSet theXPathHandlerto receive event callbacks during the parse.- Specified by:
setXPathHandlerin interfaceSAXPathEventSource- Parameters:
handler- the handler to receive callbacks
-
getXPathHandler
Description copied from interface:SAXPathEventSourceRetrieve the currentXPathHandlerwhich receives the event callbacks.- Specified by:
getXPathHandlerin interfaceSAXPathEventSource- Returns:
- the currently installed
XPathHandler
-
parse
Description copied from interface:XPathReaderParse an XPath expression, and send event callbacks to anXPathHandler.- Specified by:
parsein 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
-