How to generate XML

Martin von Loewis loewis at
Fri Dec 21 12:13:29 EST 2001

Fabrizio <realefab at> writes:

> Does anybody know if there are modules to generate XML?

I'm amazed that people always start proposing difficult-to-use
libraries when this question comes up. I'd prefer to use

print "<foo/>"

any time over SAX, DOM, or anything else people have come up with. I
have yet to see an example where generating XML to print statements
isn't more readable, and quicker to develop and maintain than any
architected API (excluding, of course, applications where you already
have a DOM tree or SAX event stream that originated from parsing a


More information about the Python-list mailing list