com.smallx.xml.xpath
Interface DocumentExpression

All Known Implementing Classes:
ConvertibleExpr

public interface DocumentExpression

This interface represents a compiled XPath expression that will operate upon an info item from a whole document tree.


Method Summary
 java.util.Iterator select(Item context)
          Applies the expression and returns an iteration of the result.
 Item selectFirst(Item context)
          Applies the expression and returns the first matching node of the result.
 java.lang.String valueOf(Item context)
          Applies the expression and returns the string value of the result.
 

Method Detail

select

public java.util.Iterator select(Item context)
                          throws XPathException
Applies the expression and returns an iteration of the result. The iteration returned by this method may throw MXPathDynamicIterationError which is a runtime exception. Whether or not this is thrown is dependent upon the implementation.

Parameters:
context - The context node for the expresion.
Throws:
XPathException

selectFirst

public Item selectFirst(Item context)
                 throws XPathException
Applies the expression and returns the first matching node of the result.

Parameters:
context - The context node for the expresion.
Throws:
XPathException

valueOf

public java.lang.String valueOf(Item context)
                         throws XPathException
Applies the expression and returns the string value of the result.

Parameters:
context - The context node for the expresion.
Throws:
XPathException