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'sXPathReaderwhich generates callbacks to anXPathHandler.- Author:
- bob mcwhirter (bob@werken.com)
-
-
Constructor Summary
Constructors Constructor Description XPathReader()Create a newXPathReaderwith a do-nothingXPathHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XPathHandlergetXPathHandler()Retrieve the currentXPathHandlerwhich receives the event callbacks.voidparse(java.lang.String xpath)Parse an XPath expression, and send event callbacks to anXPathHandler.voidsetXPathHandler(XPathHandler handler)Set theXPathHandlerto receive event callbacks during the parse.
-
-
-
Method Detail
-
setXPathHandler
public void setXPathHandler(XPathHandler handler)
Description copied from interface:SAXPathEventSourceSet theXPathHandlerto receive event callbacks during the parse.- Specified by:
setXPathHandlerin interfaceSAXPathEventSource- Parameters:
handler- the handler to receive callbacks
-
getXPathHandler
public XPathHandler getXPathHandler()
Description copied from interface:SAXPathEventSourceRetrieve the currentXPathHandlerwhich receives the event callbacks.- Specified by:
getXPathHandlerin interfaceSAXPathEventSource- Returns:
- the currently installed
XPathHandler
-
parse
public void parse(java.lang.String xpath) throws SAXPathExceptionDescription 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
-
-