@Override
    public Object unmarshal(HierarchicalStreamReader hierarchicalStreamReader, UnmarshallingContext unmarshallingContext) {
      Map<String, String> map = new HashMap<String, String>();

      while (hierarchicalStreamReader.hasMoreChildren()) {
        hierarchicalStreamReader.moveDown();
        String name = "", value = "";
        while (hierarchicalStreamReader.hasMoreChildren()) {
          hierarchicalStreamReader.moveDown();
          if ("name".equalsIgnoreCase(hierarchicalStreamReader.getNodeName())) {
            name = hierarchicalStreamReader.getValue();
          }
          if ("value".equalsIgnoreCase(hierarchicalStreamReader.getNodeName())) {
            value = hierarchicalStreamReader.getValue();
          }
          hierarchicalStreamReader.moveUp();
        }

        if (StringUtils.isNotEmpty(name) && StringUtils.isNotEmpty(value)) {
          map.put(name, value);
        }
        hierarchicalStreamReader.moveUp();
      }

      return map;
    }
Configuration provider for a MSI defined cluster.
contrib/ambari-scom/ambari-scom-server/src/main/java/org/apache/ambari/msi/ConfigurationProvider.java