minidom parse error

Ajay abra9823 at mail.usyd.edu.au
Tue Sep 7 16:45:12 CEST 2004


hi!

i am parsing the attached document.
the code is
parser = make_parser('xml.sax.drivers2.drv_xmlproc')
ruleSet = parse(ruleSetFile, parser=parser)

i am using python2.3.4 with PyXML version 0.8.1

i get the following error

Traceback (most recent call last):
  File "evaluator.py", line 59, in ?
    ea = ae.evaluate("complywitheudirective.xml", "policy-eg1.xml", 0)
  File "evaluator.py", line 22, in evaluate
    ruleSet = parse(ruleSetFile, parser=parser)
  File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\minidom.py", line 1912,
in pa
rse
    {'parser': parser, 'bufsize': bufsize})
  File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\minidom.py", line 1899,
in _d
o_pulldom_parse
    toktype, rootNode = events.getEvent()
  File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\pulldom.py", line 265,
in get
Event
    self.parser.feed(buf)
  File
"C:\PYTHON23\Lib\site-packages\_xmlplus\sax\drivers2\drv_xmlproc.py", lin
e 96, in feed
    self._parser.feed(data)
  File
"C:\PYTHON23\Lib\site-packages\_xmlplus\parsers\xmlproc\xmlutils.py", lin
e 332, in feed
    self.do_parse()
  File "C:\PYTHON23\Lib\site-packages\_xmlplus\parsers\xmlproc\xmlproc.py",
line
 93, in do_parse
    self.parse_start_tag()
  File "C:\PYTHON23\Lib\site-packages\_xmlplus\parsers\xmlproc\xmlproc.py",
line
 197, in parse_start_tag
    self.app.handle_start_tag(name,attrs)
  File
"C:\PYTHON23\Lib\site-packages\_xmlplus\sax\drivers2\drv_xmlproc.py", lin
e 368, in handle_start_tag
    AttributesNSImpl(attrs, rawnames))
  File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\pulldom.py", line 98, in
star
tElementNS
    prefix = self._current_context[a_uri]
KeyError: u'http://www.w3.org/2001/02/appelv1'


any ideas why?

thanks
cheers





----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: complywitheudirective.xml
Type: text/xml
Size: 2973 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20040908/070ff205/attachment.xml>


More information about the Python-list mailing list