[issue10026] xml.dom.pulldom strange behavior

Myrosia Dzikovska report at bugs.python.org
Fri Jul 22 13:37:24 CEST 2011


Myrosia Dzikovska <myrosia at gmail.com> added the comment:

I have the same problem, and I tried the solution suggested in here, namely expanding the node at END_ELEMENT. It does not work, raising the following exception:

Traceback (most recent call last):
  File "/group/project/onrbee/data/beetle2-eval-09/annotation_tools/logTools/add_start_times.py", line 163, in <module>
    main(sys.argv[1:])
  File "/group/project/onrbee/data/beetle2-eval-09/annotation_tools/logTools/add_start_times.py", line 130, in main
    events.expandNode(node)
  File "/usr/lib/python2.6/site-packages/_xmlplus/dom/pulldom.py", line 248, in expandNode
    parents[-1].appendChild(cur_node)
IndexError: list index out of range


The code fragment was:

  events = xml.dom.pulldom.parse( outName )
    for (event,node) in events:
        if (event == xml.dom.pulldom.END_ELEMENT) and (node.tagName == "message"):
             events.expandNode(node)

----------
nosy: +Myrosia.Dzikovska

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10026>
_______________________________________


More information about the Python-bugs-list mailing list