public static void parse(InputStream is, DistributedSystemConfig config) {
    ManagedEntityConfigXmlParser handler = new ManagedEntityConfigXmlParser();
    handler.config = config;

    try {
      SAXParserFactory factory = SAXParserFactory.newInstance();
      factory.setValidating(true);
      SAXParser parser = factory.newSAXParser();
      parser.parse(is, new DefaultHandlerDelegate(handler));

    } catch (Exception ex) {
      if (ex instanceof AdminXmlException) {
        throw (AdminXmlException) ex;

      } else if (ex.getCause() instanceof AdminXmlException) {
        throw (AdminXmlException) ex.getCause();

      } else if (ex instanceof SAXException) {
        // Silly JDK 1.4.2 XML parser wraps RunTime exceptions in a
        // SAXException. Pshaw!

        SAXException sax = (SAXException) ex;
        Exception cause = sax.getException();
        if (cause instanceof AdminXmlException) {
          throw (AdminXmlException) cause;
        }
      }

      throw new AdminXmlException(
          "While parsing XML", ex);
    }
  }
Parses XML data and from it configures a <code>DistributedSystemConfig</code>.

@throws AdminXmlException If an error is encountered while parsing the XML
geode-core/src/main/java/org/apache/geode/admin/internal/ManagedEntityConfigXmlParser.java