]> granicus.if.org Git - python/commitdiff
Paul Prescod <paul@prescod.net>:
authorFred Drake <fdrake@acm.org>
Mon, 9 Oct 2000 20:04:16 +0000 (20:04 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 9 Oct 2000 20:04:16 +0000 (20:04 +0000)
Correct the chaining between siblings.

Lib/xml/dom/minidom.py

index 3ed72366748a99336f9d692451b88eab24adba31..6dc3a524301bfc4887ea3e1040a8da49316f75e6 100644 (file)
@@ -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