Processing xml for output with cElementTree

Joseph L. Casale jcasale at activenetwerx.com
Fri Oct 17 22:35:02 CEST 2014


I am unfortunately unable to use lxml for a project and must resort to base only libraries
to create several nested elements located directly under a root element. The caveat is the
incremental writing and flushing of the nested elements as they are created.

So assuming the structure is <a><b><c>text</c><d>text</d></b></a> if I would like to
manually deconstruct this in order to write each element in order of appearance, is there
any built in facility for this?

The way I am currently doing is rather pathetic...

Thanks,
jlc



More information about the Python-list mailing list