Parsing using dtd

Martin von Loewis loewis at informatik.hu-berlin.de
Mon Oct 29 09:20:32 EST 2001


"Barghest" <barghest at wanadoo.fr> writes:

> Somebody have an example parsing an xml document against DTD ?

Using PyXML, the following should work

from xml.sax.sax2exts import XMLValParserFactory

p = XMLValParserFactory.make_parser()
p.parse("<url of document>")

You should set SAX handlers as appropriate.

HTH,
Martin



More information about the Python-list mailing list