[XML-SIG] pyxml wants Internet connection?

Gary Robinson grobinson at transpose.com
Mon Jun 9 22:35:40 EDT 2003

Dear Martin (and other xml-siggers):

A while back (May 27), Martin made a suggestion on this list to enable me to
do xml parsing when I'm not connected to the Internet. The problem was that
the xml file in question had the line:

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"

and it was apparently looking for the Apple site even when I wasn't

Martin said:

> I see. After invoking the parser's reset, and before invoking feed, you
> need to invoke
> parser._parser.SetParamEntityParsing(xml.parsers.expat.XML_PARAM_ENTITY_PARSIN

But the following code doesn't work:

from xml.sax import make_parser
import xml.parsers.expat
myparser = make_parser()

It gets the error: "AttributeError: 'NoneType' object has no attribute

If I replace the last line above with:


I get the error:

"AttributeError: ExpatParser instance has no attribute

If you have any ideas for how to get this working I'd really appreciate it!
Many thanks--



Gary Robinson
Transpose, LLC
grobinson at transpose.com

> From: "Martin v. Löwis" <martin at v.loewis.de>
> Date: Tue, 27 May 2003 14:51:08 +0200
> To: Gary Robinson <grobinson at transpose.com>
> Cc: "xml-sig at python.org" <xml-sig at python.org>
> Subject: Re: [XML-SIG] pyxml wants Internet connection?
> parser.SetParamEntityParsing

More information about the XML-SIG mailing list