org.jaxen.saxpath.base
Class XPathReader

java.lang.Object
  extended byorg.jaxen.saxpath.base.XPathReader
All Implemented Interfaces:
SAXPathEventSource, XPathReader

public class XPathReader
extends java.lang.Object
implements XPathReader

Implementation of SAXPath's XPathReader which generates callbacks to an XPathHandler.

Author:
bob mcwhirter (bob@werken.com)

Constructor Summary
XPathReader()
          Create a new XPathReader with a do-nothing XPathHandler.
 
Method Summary
 XPathHandler getXPathHandler()
          Retrieve the current XPathHandler which receives the event callbacks.
 void parse(java.lang.String xpath)
          Parse an XPath expression, and send event callbacks to an XPathHandler.
 void setXPathHandler(XPathHandler handler)
          Set the XPathHandler to receive event callbacks during the parse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathReader

public XPathReader()
Create a new XPathReader with a do-nothing XPathHandler.

Method Detail

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
Parse an XPath expression, and send event callbacks to an XPathHandler.

Specified by:
parse in interface XPathReader
Parameters:
xpath - the textual XPath expression to parse
Throws:
SAXPathException - if the expression is syntactically incorrect


Copyright © 2001-2005 Codehaus. All Rights Reserved.