xml in python

Shawn Milochik Shawn at Milochik.com
Fri May 8 12:36:12 EDT 2009


On Fri, May 8, 2009 at 3:46 AM, Rustom Mody <rustompmody at gmail.com> wrote:
> Can someone give me a heads up on xml parsing in python?
> The context is that I want to write a simple docbook to text converter.
> DOM is alright -- dont want to break my head with SAX just for performance
> when my documents are not likely to be large.
>
> My problem is that there seems to be so many nearly equivalent ways (Pyxml?
> Amara?) some of which have moved from 3rd party to builtin status that I am
> not clear what is the current method of choice.
>
> Thanks
> --

I've been using minidom for simple XML processing with success. The
XML module seems to be the way to go, considering how many of its
child modules are listed on http://docs.python.org/library/.

import xml.dom.minidom as minidom

Shawn



More information about the Python-list mailing list