From: Fred Drake Date: Mon, 9 Oct 2000 20:04:16 +0000 (+0000) Subject: Paul Prescod : X-Git-Tag: v2.0c1~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13a3069c2b77df9874d68b5afef97a81525b4ceb;p=python Paul Prescod : Correct the chaining between siblings. --- diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py index 3ed7236674..6dc3a52430 100644 --- a/Lib/xml/dom/minidom.py +++ b/Lib/xml/dom/minidom.py @@ -102,6 +102,13 @@ class Node: newChild.parentNode = self def appendChild(self, node): + if self.childNodes: + last = self.lastChild + node.previousSibling = last + last.nextSibling = node + else: + node.previousSibling = None + node.nextSibling = None self.childNodes.append(node) return node