docs: private static HashMap<String, HashMap<String, String>> readConfigurations(
        ResourceLoader resourceLoader, String configFile, String className)
        throws IOException {
      HashMap<String, HashMap<String, String>> configs = null;
      InputStream reader = resourceLoader.openResource(configFile);
      // parse xml
      XMLInputFactory factory = XMLInputFactory.newInstance();
      try {
        XMLStreamReader streamReader = factory.createXMLStreamReader(reader);
        String currentElement = null;
        ArrayList<String> currentElements = new ArrayList<String>();
        QName qname;
        boolean skipCurrentConfigurations = false;
        try {
          int event = streamReader.getEventType();
          while (true) {
            switch (event) {
            case XMLStreamConstants.START_DOCUMENT:
              if (!streamReader.getCharacterEncodingScheme().equals("UTF-8")) {
                throw new IOException("XML not UTF-8 encoded");
              }
              break;
            case XMLStreamConstants.END_DOCUMENT:
              break;
            case XMLStreamConstants.SPACE:
              break;
            case XMLStreamConstants.START_ELEMENT:
              // get data
              qname = streamReader.getName();
              if (configs == null) {
                if (qname.getLocalPart().equals(CONFIGURATIONS_MTAS)) {
                  configs = new HashMap<String, HashMap<String, String>>();
                } else {
                  throw new IOException("no Mtas Configurations File");
                }
              } else if (currentElement != null
                  && currentElement.equals(CONFIGURATIONS_MTAS)) {
                if (qname.getLocalPart().equals(CONFIGURATIONS_CONFIGURATIONS)) {
                  skipCurrentConfigurations = true;
                  if (className != null) {
                    for (int i = 0; i < streamReader.getAttributeCount(); i++) {
                      if (streamReader.getAttributeLocalName(i).equals("type")) {
                        if (streamReader.getAttributeValue(i).equals(className)) {
                          skipCurrentConfigurations = false;
                        }
                      }
                    }
                  }
                } else {
                  throw new IOException("unexpected " + qname.getLocalPart());
                }
              } else if (currentElement != null
                  && currentElement.equals(CONFIGURATIONS_CONFIGURATIONS)
                  && !skipCurrentConfigurations) {
                if (qname.getLocalPart().equals(CONFIGURATIONS_CONFIGURATION)) {
                  String configurationName = null;
                  HashMap<String, String> configurationValues = new HashMap<String, String>();
                  for (int i = 0; i < streamReader.getAttributeCount(); i++) {
                    if (streamReader.getAttributeLocalName(i)
                        .equals(CONFIGURATIONS_CONFIGURATION_NAME)) {
                      configurationName = streamReader.getAttributeValue(i);
                    } else {
                      configurationValues.put(
                          streamReader.getAttributeLocalName(i),
                          streamReader.getAttributeValue(i));
                    }
                  }
                  if (configurationName != null) {
                    configs.put(configurationName, configurationValues);
                  } else {
                    throw new IOException("configuration without "
                        + CONFIGURATIONS_CONFIGURATION_NAME);
                  }
                } else {
                  throw new IOException("unexpected tag " + qname.getLocalPart());
                }
              }
              currentElement = qname.getLocalPart();
              currentElements.add(currentElement);
              break;
            case XMLStreamConstants.END_ELEMENT:
              if (currentElement != null
                  && currentElement.equals(CONFIGURATIONS_CONFIGURATIONS)) {
                skipCurrentConfigurations = false;
              }
              int i = currentElements.size();
              currentElements.remove((i - 1));
              if (i > 1) {
                currentElement = currentElements.get(i - 2);
              } else {
                currentElement = null;
              }
              break;
            case XMLStreamConstants.CHARACTERS:
              break;
            }
            if (!streamReader.hasNext()) {
              break;
            }
            event = streamReader.next();
          }
        } finally {
          streamReader.close();
        }
      } catch (XMLStreamException e) {
        log.debug(e);
      }
      return configs;
    }