Interface XPathExpression

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static short BOOLEAN
      The Boolean expression type.
      static short ERROR
      Expression of type error.
      static short FILTER_EXPR
      The FilterExpr expression type.
      static short LOCATION_PATH
      The LocationPath expression type.
      static short NODE_TEST
      The NodeTest expressions type
      static short NUMBER
      The NodeTest expressions type
      static short PATH_EXPR
      The PathExpr expression type.
      static short PRIMARY
      The Primary expression type.
      static short STEP
      The Step expression type.
      static short STRING
      The String expression type.
      static short UNION_EXPR
      The union expression type.
    • Method Detail

      • getExprType

        short getExprType()
        Returns the type of this expression.
        Returns:
        The type of this expression
      • evaluate

        XPathResult evaluate​(XPathContext context)
                      throws XPathException
        Evaluates the expression and returns the XPath result.
        Parameters:
        context - The XPathContext to use during evaluation.
        Returns:
        The XPathResult (not null).
        Throws:
        XPathException - if an error occured while evaluating this expression.
      • toString

        java.lang.String toString()
        Returns the XPath expression as a string. The returned value is a valid XPath expression that can be parsed into an equivalent XPathExpression object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The XPath expression as a string