if (f1.exists()) {
Mapping mapping = new Mapping();
try {
mapping.loadMapping(mappingfile);
Writer writer = new FileWriter(filename);
Marshaller marshaller = new Marshaller(writer);
marshaller.setMapping(mapping);
marshaller.marshal(this);
writer.close();
log.info("written to XML");
} catch (Exception e) {
log.error(e.getMessage());
e.printStackTrace();