code: public static Boolean evaluateAsBoolean(Node node, String xPathExpression, NamespaceContext nsContext) {
          return (Boolean) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.BOOLEAN);
      }
docs: Evaluate XPath expression with result type Boolean value.
  @param node
  @param xPathExpression
  @param nsContext
  @return