[XML-SIG] Parsing DTD

Lars Marius Garshol larsga@garshol.priv.no
17 Jul 2001 09:45:23 +0200


* Philip King
| 
| Here is my dilemna: I cannot figure the hoops one must just through in
| order to have a parser (either Expat, xmlproc, xmllib, etc...) to read
| and parse a DTD.  They all seem to choke with a syntax error...

As Alexandre says you need to use a special DTD parser. The XML
parsers will assume they are given an XML document and freak when they
find that they are chewing something completely different. 

The DTD parser of xmlproc is the only way I know of doing this in
Python. It should work just fine, though.

--Lars M.