protected void saveSettings(final String xmlFilename) throws IOException { final Element root = new Element("Settings"); root.addContent(viewer.stateToXml()); root.addContent(setupAssignments.toXml()); root.addContent(manualTransformation.toXml()); root.addContent(bookmarks.toXml()); final Document doc = new Document(root); final XMLOutputter xout = new XMLOutputter(Format.getPrettyFormat()); xout.output(doc, new FileWriter(xmlFilename)); }