Re: not following DTDs

Dieter Maurer <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
Alex Gittens wrote at 2005-6-13 08:36 -0700:
>I'm using SAX to load XBEL files, and I noticed that when my computer
>is not connected to the Internet, the script fails with an error about
>not being able to find the DTD that is referenced in the file. Is
>there some way to turn off searching for the DTD?

from xml.sax.handler import feature_external_ges
from xml.sax import make_parser

parser= make_parser(); parser.setDTDHandler(None)
parser.setFeature(feature_external_ges,0)

-- 
Dieter
_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.