Interface XPathExpr

  • All Superinterfaces:
    java.io.Serializable

    public interface XPathExpr
    extends java.io.Serializable
    A wrapper around an XPath expression.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List asList​(Context context)
      Evaluates the expression and returns a list containing the resulting nodes, or a singleton list containing a Double, String, or Boolean.
      Expr getRootExpr()
      Returns the wrapped expression object.
      java.lang.String getText()
      Returns a String containing the XPath expression.
      void setRootExpr​(Expr rootExpr)
      Changes the wrapped expression object.
      void simplify()
      Simplifies the XPath expression.
    • Method Detail

      • getRootExpr

        Expr getRootExpr()
        Returns the wrapped expression object.
        Returns:
        the wrapped Expr object
      • setRootExpr

        void setRootExpr​(Expr rootExpr)
        Changes the wrapped expression object.
        Parameters:
        rootExpr - the new expression object to wrap
      • getText

        java.lang.String getText()
        Returns a String containing the XPath expression.
        Returns:
        the text form of this XPath expression
      • simplify

        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.
      • asList

        java.util.List asList​(Context context)
                       throws JaxenException
        Evaluates the expression and returns a list containing the resulting nodes, or a singleton list containing a Double, String, or Boolean.
        Parameters:
        context - the context in which to evaluate this expression
        Returns:
        a list
        Throws:
        JaxenException - if expression evaluation fails