[XML-SIG] minidom parse error - keyerror
Alan Kennedy
alanmk at hotmail.com
Wed Sep 8 07:20:01 EDT 2004
[Ajay]
> i have tried the archives now and heaps of Google searches but am no closer
> to finding out what the error is.
>
> the error does not appear if i use expat.
and
>>i am parsing the attached document.
>>the code is
>>parser = make_parser('xml.sax.drivers2.drv_xmlproc')
>>ruleSet = parse(ruleSetFile, parser=parser)
>>i get the following error
>>
>>Traceback (most recent call last):
>> File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\pulldom.py", line 98,
>>in startElementNS
>> prefix = self._current_context[a_uri]
>>KeyError: u'http://www.w3.org/2001/02/appelv1'
Since I can't see your document, I can't say for sure.
But by the look of that traceback, you have neglected to declare a
namespace in your XML document. The error appears to occur when the
parser is looking for the "namespace prefix" associated with the
namespace URI "http://www.w3.org/2001/02/appelv1".
Post an example document if I'm wrong.
--
alan kennedy
------------------------------------------------------
email alan: http://xhaus.com/contact/alan
More information about the Python-list
mailing list