Package org.jaxen.saxpath.base
Class XPathReader
- java.lang.Object
-
- org.jaxen.saxpath.base.XPathReader
-
- All Implemented Interfaces:
SAXPathEventSource
,XPathReader
public class XPathReader extends java.lang.Object implements XPathReader
Implementation of SAXPath'sXPathReader
which generates callbacks to anXPathHandler
.- Author:
- bob mcwhirter (bob@werken.com)
-
-
Constructor Summary
Constructors Constructor Description XPathReader()
Create a newXPathReader
with a do-nothingXPathHandler
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XPathHandler
getXPathHandler()
Retrieve the currentXPathHandler
which receives the event callbacks.void
parse(java.lang.String xpath)
Parse an XPath expression, and send event callbacks to anXPathHandler
.void
setXPathHandler(XPathHandler handler)
Set theXPathHandler
to receive event callbacks during the parse.
-
-
-
Method Detail
-
setXPathHandler
public void setXPathHandler(XPathHandler handler)
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
public XPathHandler 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
public void parse(java.lang.String xpath) throws SAXPathException
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
-
-