Map<String, XmlResourceConfig> configMap = xmlBundlerConfig.getConfigMap();
if (!configMap.containsKey(rootElement))
{
siblingReader.close();
throw new ContentFileProcessingException(document, "Document contain unsupported root element: '" + rootElement + "'");
}
else
{
if (!resourceReaders.containsKey(rootElement))
{
resourceReaders.put(rootElement, new ArrayList<XmlSiblingReader>());
}
List<XmlSiblingReader> readerSet = resourceReaders.get(rootElement);
readerSet.add(siblingReader);
}
}catch ( XMLStreamException | IOException e){
throw new ContentFileProcessingException(document, e);
}
}
return resourceReaders;
}