all I want is to write an xml file with python (the simpliest possible), without typing it as a string.
SystemAdmin 110000D4XK29 Posts
Re: write an xml file with python2003-11-01T06:49:02ZThis is the accepted answer. This is the accepted answer.Well... if you really do want the simplest thing, that [b]is[/b] writing it as a string.
There are a variety of other modules--everything from in-memory XML APIs, to templating systems, to object serialization as XML (gnosis.xml.pickle). But it's hard to say which type of thing you want without more description.
I've covered a number of these styles in this column, and also over in [u]Charming Python[/u] in the Linux Zone. Uche Ogbuji also does a good job in a similar area, both for developerWorks, and for xml.com.