reorderDOM(getDoc().getRootElement(), getNamespace());
FormatHandler handler = new FormatHandler(this);
handler.setEnconding(encoding);
SAXOutputter saxo = new SAXOutputter(handler);
saxo.output(getDoc());
try {
getBuilder(true).build(new StringReader(handler.getXML()));
} catch (JDOMException e) {
int res = MainWindow.message(Messages.getString("MainListener.outputInvalid",