
Nov. 10, 2015
2:11 p.m.
Am .11.2015, 14:52 Uhr, schrieb Holger Joukl <Holger.Joukl@lbbw.de>:
Interesting question. I don't know any obvious conversion method but I'd say just go for serialization & re-parsing. It's an area where lxml usually shines speed-wise.
I also reckon that convert to string and parse is the way to go. Converting to string is very fast, and the main overhead when parsing is the creation of the new object tree, which you'd have anyway. Note, as Holger hints, the total size of the tree you're working on may be your biggest worry: XML is a memory hog. 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