From 13a3069c2b77df9874d68b5afef97a81525b4ceb Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 9 Oct 2000 20:04:16 +0000 Subject: [PATCH] Paul Prescod : Correct the chaining between siblings. --- Lib/xml/dom/minidom.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py index 3ed72366748..6dc3a524301 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