XML using standard Python modules

Martin von Loewis loewis at informatik.hu-berlin.de
Wed Sep 12 11:16:36 EDT 2001


Dale Strickland-Clark <dale at riverhall.NOSPAMco.uk> writes:

> A simple app to start with, it will read a plain text file containing
> some data, convert it to XML and write an XML file.

If you want to generate XML, you should not use any of the XML
libraries. Most likely, it is easier to use the right set of print
statements.

> There seems to be half a dozen XML modules. Which is the right one for
> this type of application? XML.SAX?

All of the XML modules are primarily for reading XML (ie. parsing
it). People argue that you can use the DOM also for constructing XML,
but I have yet to see examples where that approach is simpler than
plain print statements.

Regards,
Martin




More information about the Python-list mailing list