Paul Prescod <paul@prescod.net>:
Correct the chaining between siblings.
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index 3ed7236..6dc3a52 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -102,6 +102,13 @@
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