XMLOutputter output = new XMLOutputter();
String xml = output.outputString(doc);
cachedXML.put(name, xml);
// return module:
ModuleParser parser = new ModuleParser();
Module module;
try {
module = parser.parseFromFile(moduleFile);
}
catch(Exception e) {
logger.error("Error loading AppXML: " + moduleFile.getAbsolutePath(), e);
throw e;
}