[lxml-dev] Can't load external DTD.
Stefan Behnel
stefan_ml at behnel.de
Fri Feb 22 07:49:10 CET 2008
Hi,
Nef Asus wrote:
> lxml.etree.XMLSyntaxError: failed to load external entity "NULL",
> line 9, column 83
>
> this is my xml up to line 9:
>
> <?xml version="1.0" encoding="iso-8859-1" ?>
> <!--
> Old reference
> <!DOCTYPE rem:requirementsProject SYSTEM "C:\tmp\rem\foo.dtd">
> -->
> <!--
> <!DOCTYPE rem:requirementsProject SYSTEM "file:C:\\Desarrollo\\pythontes
> ts\lxml\foo.dtd">
> -->
> <!DOCTYPE rem:requirementsProject SYSTEM
> "C:\Desarrollo\pythontests\lxml\foo.dtd">
>
>
> I omitted the commented lines in my first snippet.
Hmm, I think the "NULL" comes from the fact that you only use "SYSTEM",
without providing an ID. libxml2 printf()'s the ID here.
So, well, it can't find it on your system. Have you tried something like
"file://C:/Desarrollo/pythontests/lxml/foo.dtd"
?
And: have you made sure the file is actually there?
Stefan
More information about the lxml-dev
mailing list