if (list == null || list.getLength() == 0)
{
// try looking for a QUALIFIED_CONFIG_ROOT
list = root.getElementsByTagName(QUALIFIED_CONFIG_ROOT);
if (list == null || list.getLength() == 0)
throw new ConfigurationException("Can't find " + CONFIG_ROOT + " or " + QUALIFIED_CONFIG_ROOT + " tag");
}
Map<String, Configuration> result = new HashMap<String, Configuration>();
for (int i = 0; i < list.getLength(); i++)
{
Node node = list.item(i);
if (node.getNodeType() != Node.ELEMENT_NODE)
{
continue;
}
Element element = (Element) node;
String name = element.getAttribute(CONFIG_NAME);
if (name == null || name.trim().length() == 0)
throw new ConfigurationException("Element " + element + " has no name attribute");
XmlConfigurationParser parser = new XmlConfigurationParser();
Configuration c;
if (parser.isValidElementRoot(element))
{