[PyKDE] XML support

Derek Fountain derekfountain at yahoo.co.uk
Tue Nov 25 03:57:00 GMT 2003


> Is anyone doing anything major with the qtxml package? Is XML support in
> PyQt experimental? Perhaps I would be better to rely on another package for
> now...I also see the none of the SAX stuff is wrapped or exposed. If qtxml
> was good enough, it'd be one less package I'd need to add to my project.

I don't really know much about the Qt XML stuff, and even less about its 
support in PyQt. However, I have spent a bit of time recently looking into 
Python XML support. My conclusion is as follows:

if you need basic XML support, the Python-supplied 'xml' package may well do 
what you need. It's based on the ubiquitous expat parser, so it's fast and 
robust. However, it's not a validating parser, and it doesn't have support 
for XPATH or XSLT.

if you need those, go straight to 4Suite. State of the art stuff, designed and 
written for Python, with all the features you could ask for on a very fast 
'C' based implementation.

There's also the PyXML package which claims to be a drop in replacement for 
the standard 'xml' package. This works well enough and has a validating 
parser and full DOM Level 2 support. It has a dated XPATH implementation and 
buggy XSLT, plus it's slower than 4Suite, so it's hard to recommend it over 
4Suite unless lightness is high amongst your priorities.

Quite where that leaves qtxml I'm not sure. I'm not convinced it's a 
particularly worthy addition to Qt since XML libraries are complex and hard 
work to keep up to date. It's bound to be a lesser solution that any of the 
specific XML C++ packages out there like Xerces. A PyQt port of qtxml seems 
to make even less sense, since Python has an absolute abundance of top 
quality XML solutions.

I appreciate your point about keeping the packages base of your application as 
simple as possible, but to be honest, if that's the best reason you have, 
installing 4Suite will be well justified.

-- 
> eatapple
core dump




More information about the PyQt mailing list