public static Element querySingleElement(Node node, String searchString,
      final XPathContext xPathContext) throws XPathExpressionException {
    XPath xpath = XPathFactory.newInstance().newXPath();
    xpath.setNamespaceContext(xPathContext);
    Object result = xpath.evaluate(searchString, node, XPathConstants.NODE);
    try {
      return (Element) result;
    } catch (ClassCastException e) {
      throw new XPathExpressionException("Not an org.w3c.dom.Element: " + result);
    }
  }
Create an XML {@link Document} from the given {@link Reader}.

@param reader to create document from.
@return {@link Document} if successful, otherwise false.
@since GemFire 8.1
geode-core/src/main/java/org/apache/geode/management/internal/configuration/utils/XmlUtils.java