Am .06.2015, 12:06 Uhr, schrieb Frederik Elwert <frederik.elwert@rub.de>:
1. I had to add an nsmap argument to the creation of "element" in order to prevent an "ns0:" prefix in the output. But this lead to a duplication of the declaration of the default namespace 'http://www.dspin.de/data/textcorpus' on both <TextCorpus> and <tokens>.
If you assign a default namespace then *all* child elements are within this namespace unless otherwise specified. i.e. don't use FQN for child elements. If you want to pretty print the result then it's hard to beat using the tidy command line tool: tidy -m --xml file.xml Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Kronenstr. 27a Düsseldorf D- 40217 Tel: +49-211-600-3657 Mobile: +49-178-782-6226