T
Tomba
hi all,
I'm writing an XML file from a DOM Document like this:
Source source = new DOMSource(doc);
Result result = new StreamResult(new File("settings.xml"));
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
While however it works, all XML tags are written on one line.
Is there any way I can change that behaviour so that there is
indentation and newlines in the file?
Thanks already
I'm writing an XML file from a DOM Document like this:
Source source = new DOMSource(doc);
Result result = new StreamResult(new File("settings.xml"));
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
While however it works, all XML tags are written on one line.
Is there any way I can change that behaviour so that there is
indentation and newlines in the file?
Thanks already