/** INTERNAL: */
  public Map buildAppInfoMap(List appInfoElements) {
    HashMap appInfoMap = new HashMap();

    // Build AppInfo map
    if (appInfoElements != null) {
      for (int i = 0; i < appInfoElements.size(); i++) {
        Element nextElement = (Element) appInfoElements.get(i);

        if (nextElement.getNamespaceURI().equals(XMLConstants.SCHEMA_URL)
            && nextElement.getLocalName().equals("appinfo")) {
          String key = nextElement.getAttribute(SDOConstants.APPINFO_SOURCE_ATTRIBUTE);
          String value = (String) appInfoMap.get(key);
          StringWriter sw = new StringWriter();
          WriterRecord wrec = new WriterRecord();
          wrec.setWriter(sw);
          wrec.node(nextElement, new NamespaceResolver());
          appInfoMap.put(key, value == null ? sw.toString() : value + sw.toString());
        }
      }
    }
    return appInfoMap;
  }