[XML-SIG] patch to xml.dom.core

Fred L. Drake Fred L. Drake, Jr." <fdrake@acm.org
Fri, 20 Nov 1998 22:18:42 -0500 (EST)


  The patch below didn't appear to make it into the update; this is
what allows nodes other than the documentElement to get written by the 
Document.toxml() method.


  -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/21 03:13:43
***************
*** 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