How to generate XML

Gerhard Häring gh_pythonlist at gmx.de
Thu Dec 20 09:24:59 EST 2001


Le 20/12/01 à 14:10, Fabrizio écrivit:
> Does anybody know if there are modules to generate XML?
> I know there is SAX, but it is only for parsing, isn't it?

You can use the DOM API for this. I had a similar question on the Python
XML mailing list, and Martin von Löwis proposed a much simpler approach
instead:

http://mail.python.org/pipermail/xml-sig/2001-December/006779.html

I've also put my first Python XML script online. It reads a
configuration from an XML file using DOM and also creates XML via the
DOM API again. The Python XML docs are thin, so this might actually be
useful for someone:

http://www.cs.fhm.edu/~ifw00065/VitaminP/index.html

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))




More information about the Python-list mailing list