code: public static Node asNode(String nodeName, Node node, XPath xpath)
              throws XPathExpressionException {
          if (node == null) return null;
          return (Node) xpath.evaluate(nodeName, node, XPathConstants.NODE);
      }
docs: Same as {@link #asNode(String, Node)} but allows an xpath to be
  passed in explicitly for reuse.