com.smallx.xml.xpath
Interface EventState


public interface EventState

This interface represents an in-progress state for an event-oriented XPath.


Method Summary
 Item match(Item current)
          Returns 'true' if the event is in a of the matching sub-tree of the xpath from which this state was created.
 void reset()
          Resets the state and effectively resets the XPath.
 

Method Detail

match

public Item match(Item current)
           throws XPathException
Returns 'true' if the event is in a of the matching sub-tree of the xpath from which this state was created. If the match returns 'false', subsequent events can be passed to this method until the end of the document. In addition, if the method returns true and then returns false (when the matching subtree finishes), subsequent events can be passed to check for additional matches.

If a whole infoset is passed event-by-event to this method, all matching subtrees will be identified in the document.

Parameters:
current - The info item to check
Throws:
MXPathDynamicError - Thrown when there is a dynamic error in evaluating the XPath
XPathException

reset

public void reset()
Resets the state and effectively resets the XPath.