Which XML?

Stefan Behnel stefan.behnel-n05pAM at web.de
Mon Jun 25 04:47:05 EDT 2007


kyosohma at gmail.com wrote:
> On Jun 24, 7:04 pm, Bruno Barberi Gnecco
> <brunobgDELETET... at users.sourceforge.net> wrote:
>>         I've found a lot of XML libraries for Python. Any advices on which
>> one to use (or *not* to use)? My requirements are: support for XPath,
>> stability (a must, segfaults are not an option), with DOM API and good
>> performance desirable.
>
> I use the minidom module for most of my XML work, but I don't think it
> has much in the way of XPath. I think lxml might work better for that
> sort of thing and I think it's part of ElementTree:
> 
> http://codespeak.net/lxml/dev/objectify.html

lxml is not part of ElementTree (only mostly compatible), but it's a must if
you want to have a simple API *and* XPath *and* good performance.

http://codespeak.net/lxml/

The API is not W3C-DOM compatible, but that's rather a plus IMHO.

Stefan



More information about the Python-list mailing list