code: public <T> T evaluateXPath(String xpathExpression, Node context, Class<T> as)
      throws XPathExpressionException {
      checkContext(context);
      return castAs(
        getXPathProcessor().evaluate(xpathExpression, context, returnXPathConstant(as)),
        as
      );
    }
docs: Evaluate a string XPath expression relative to a node such as a node
  returned by a previous XPath expression.
  An XPath expression can return a Node or subinterface such as
  Element or Text, a NodeList, or a Boolean, Number, or String value.
  @param xpathExpression	the XPath expression as a string
  @param context	the node for evaluating the expression
  @param as	the type expected to be matched by the xpath
  @param <T> the type to return
  @return	the value produced by the XPath expression
  @throws XPathExpressionException if xpathExpression cannot be evaluated