[XML-SIG] turning off dtd resolver in sax
Radovan.Chytracek at cern.ch
Thu Oct 23 08:17:05 EDT 2003
I was having the same problem and tried to discuss it here without any
feedback, for details see:
where I have provided a solution to this. However, it does not work as
is because PyXML has for some reasons disabled EntityResolver proper
call sequence. I had to hack my local Python installation to make it
work. Hope this helps you a bit.
> -----Original Message-----
> From: Paul Tremblay [mailto:phthenry at earthlink.net]
> Sent: Thursday, October 23, 2003 8:03 AM
> To: xml-sig at python.org
> Subject: [XML-SIG] turning off dtd resolver in sax
> Is there a way to run SAX if the dtd in the document points
> to a url, and the url cannot be retrieved? I can parse my
> documents with SAX so long as I am connected to the internet.
> But when I am not connected, I get an error that the url
> cannot be found.
> I could just delete the dtd, but this is kind of a hack. I am
> distributing code, and I would like for the XML document
> which I am parsing to have a dtd.
> Here is a snippet of my code:
> parser = xml.sax.make_parser()
> parser.setFeature(feature_namespaces, 0)
> section_handler = FormSections(
> write_obj = write_obj,
> highest_level = self.__highest_level,
> *Paul Tremblay *
> *phthenry at earthlink.net*
> XML-SIG maillist - XML-SIG at python.org
More information about the XML-SIG