[XML-SIG] patch to core.py
Fred L. Drake
Fred L. Drake, Jr." <fdrake@acm.org
Mon, 23 Nov 1998 15:33:35 -0500 (EST)
Andrew M. Kuchling writes:
> You didn't attach the patch... On the other hand, I can
> probably fix it myself from your description.
Oops! It's below. Yeah, I know you could, but some people like
patches because they know there've been no typos introduced between
testing and the change information.
-Fred
--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives
1895 Preston White Dr. Reston, VA 20191
Index: core.py
===================================================================
RCS file: /projects/cvsroot/xml/dom/core.py,v
retrieving revision 1.31
diff -c -c -r1.31 core.py
*** core.py 1998/11/21 02:48:12 1.31
--- core.py 1998/11/23 20:29:12
***************
*** 931,938 ****
s = '<?xml version="1.0"?>\n'
if self.documentType:
s = s + self.documentType
! if len(self._node.children):
! n = self._node.children[0]
n = NODE_CLASS[ n.type ] (n, self, self)
s = s + n.toxml()
return s
--- 931,937 ----
s = '<?xml version="1.0"?>\n'
if self.documentType:
s = s + self.documentType
! for n in self._node.children:
n = NODE_CLASS[ n.type ] (n, self, self)
s = s + n.toxml()
return s
***************
*** 1038,1043 ****
--- 1037,1045 ----
return self.documentType
def get_implementation(self):
return self.DOMImplementation
+
+ def get_childNodes(self):
+ return NodeList(self._node.children, self, self)
def get_documentElement(self):
"""Return the root element of the Document object, or None