public void saveXMLDocument() {
try {
log.info("saving classpath file...");
XMLSerializer serializer = new XMLSerializer();
serializer.setOutputCharStream(new FileWriter(file));
serializer.serialize(doc);
} catch (IOException e) {
log.error("unable to save resulting classpath file!");
throw new RuntimeException("unable to save resulting classpath file", e);
}
}