[New-bugs-announce] [issue16425] minidom replaceChild(new_child, old_child) removes new_child even if in another document

Martin Kugler report at bugs.python.org
Wed Nov 7 10:05:50 CET 2012


New submission from Martin Kugler:

Calling doc.replaceChild(new_child, old_child) with new_child and old_child being similar nodes in two different documents results in new_child to be removed from its document instead of old_child being removed from doc.

Example:
        new_child = get_element_x(doc_a)
        old_child = get_element_x(doc_b)
        parent = get_element_y(doc_b)
        parent.replaceChild(new_child, old_child)

=> new_child will be removed from doc_a. Instead old_child should be removed from doc_b.

----------
components: XML
messages: 175057
nosy: Martin.Kugler
priority: normal
severity: normal
status: open
title: minidom replaceChild(new_child, old_child) removes new_child even if in another document
type: behavior
versions: Python 2.7

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


More information about the New-bugs-announce mailing list