[issue1433694] normalize function in minidom unlinks empty child nodes

Malte Helmert report at bugs.python.org
Fri Feb 1 23:35:19 CET 2008


Malte Helmert added the comment:

OK, I think I found the root cause. Node.normalize regenerates the list
of children L with their previousSibling/nextSibling references from
scratch; however, it fails to set the nextSibling reference for the very
last element of L to None at the end. This is necessary iff the last
node in the original child list is removed. The attached patch should
solve the problem.

In cases like this, should I also add a regression test?

Added file: http://bugs.python.org/file9345/MINIDOM-PATCH

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1433694>
_____________________________________


More information about the Python-bugs-list mailing list