pyXML (0.8.1): ignoring DTD part...

Gillou nospam at
Tue Oct 8 15:24:55 CEST 2002


I'm looking for a way to ignore the DTD of an XML. In example

data = """<?xml version="1.0"?>
<!DOCTYPE stuff SYSTEM "nowhere.dtd">
from xml.dom.ext.reader.Sax2 import Reader
xr = Reader()
# Error raised below cause there's no "nowhere.dtd"

I want to carry on parsing even if there's no DTD

Any hint ?

Thanks by advance


More information about the Python-list mailing list