[XML-SIG] Choosing SAX parsers

Graham Ashton graham@coms.com
Mon, 25 Jun 2001 08:43:11 +0100


I posted the following to comp.lang.python, and it was suggested I subscribe
and sent it here instead...

I've just started playing with xml.sax and the XML HOWTO. I had to
recompile python to include expat as I didn't have any other parsers
available (python 2.1, built from source, Debian Linux).

This is fine, and xml.sax works nicely with expat now that I've
recompiled, but I was a bit surprised that expat was the only parser
availble after the docs had been telling me how I could choose between
parsers, etc. Am I missing some stuff?

What I'd really like is a parser that knows how to enforce DTDs, which I
know expat-1.x doesn't. Speed isn't an issue for me as my documents are
very small.

What's my best bet? Installing PyXML? If I do, will it overwrite the xml.*
module tree that I've got already? Are there any issues installing it over
the top of the stuff in the standard library (some of which I believe is
the same codebase)?

Any pointers would be much appreciated. Thanks.

-- 
Graham