public static LinkedHashMap<String, CacheElement> buildElementMap(final Document doc)
      throws IOException, XPathExpressionException, SAXException, ParserConfigurationException {
    Node cacheNode = doc.getFirstChild();
    if ("#comment".equals(cacheNode.getNodeName())) {
      cacheNode = cacheNode.getNextSibling();
    }
    final Map<String, String> schemaLocationMap =
        XmlUtils.buildSchemaLocationMap(getAttribute(cacheNode,
            W3C_XML_SCHEMA_INSTANCE_ATTRIBUTE_SCHEMA_LOCATION, W3C_XML_SCHEMA_INSTANCE_NS_URI));

    final LinkedHashMap<String, CacheElement> elementMap = new LinkedHashMap<>();

    buildElementMapCacheType(elementMap,
        resolveSchema(schemaLocationMap, CacheXml.GEODE_NAMESPACE));

    // if we are ever concerned with the order of extensions or children process them here.

    return elementMap;
  }
Build <code>cache</code> element map for given <cod>doc</code>'s schemaLocation for
{@link CacheXml#GEODE_NAMESPACE}.

@param doc {@link Document} to parse schema for.
@return Element map
@since GemFire 8.1
geode-core/src/main/java/org/apache/geode/management/internal/configuration/domain/CacheElement.java