org.jaxen.expr
Interface XPathExpr
- Serializable
- DefaultXPathExpr
public interface XPathExpr
extends Serializable
A wrapper around an XPath expression.
List | asList(Context context)- Evaluates the expression and returns a list cintaing the resulting nodes,
or a singleton list containing a
Double, String,
or Boolean.
|
Expr | getRootExpr()- Returns the wrapped expression object.
|
String | getText()- Returns a String containing the XPath expression.
|
void | setRootExpr(Expr rootExpr)- Changes the wrapped expression object.
|
void | simplify()- Simplifies the XPath expression.
|
asList
public List asList(Context context)
throws JaxenException Evaluates the expression and returns a list cintaing the resulting nodes,
or a singleton list containing a Double, String,
or Boolean.
context - the context in which to evaluate this expression
getRootExpr
public Expr getRootExpr()
Returns the wrapped expression object.
getText
public String getText()
Returns a String containing the XPath expression.
- the text form of this XPath expression
setRootExpr
public void setRootExpr(Expr rootExpr)
Changes the wrapped expression object.
rootExpr - the new expression object to wrap
simplify
public void simplify()
Simplifies the XPath expression. For example, the expression
//para[1 = 1] could be simplified to
//para. In practice, this is usually a noop.
Jaxen does not currently perform any simplification.