public static boolean xpathExists ( Node document , String xpathExpression , Map < String , String > namespaceMapping ) throws XPathException , MarshallingException { Boolean result = ( Boolean ) executeXPath ( document , xpathExpression , namespaceMapping , XPathConstants . BOOLEAN ) ; return result != null && result ; }
Runs the given xpath and returns a boolean result .