[XML-SIG] expat and external DTDs
Andrew Shearer
ashearer at shearersoftware.com
Sat Oct 18 15:58:31 EDT 2003
I had a similar problem with the first cut of a parser for Apple's
PList format. It worked fine when I was connected to the Internet, but
failed when I wasn't. The documents specified an Internet-based DTD
when they really could stand alone, so I used code similar to the
following:
parser = xml.sax.make_parser()
parser.setFeature(xml.sax.feature_external_ges, 0)
parser.setFeature(xml.sax.feature_external_pes, 0)
The complete code is at
<http://www.shearersoftware.com/software/developers/plist/>.
On Friday, October 17, 2003, at 12:02 PM, xml-sig-request at python.org
wrote:
> From: Alexandre Fayolle <Alexandre.Fayolle at logilab.fr>
> I'm using expat through the SAX interface, and it chokes on relative
> links to the DTD in the DOCTYPE of the documents I parse. How can I
> tell
> expat not to attempt to read the DTD ?
--
Andrew Shearer
http://www.shearersoftware.com/
More information about the XML-SIG
mailing list