[Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.5,1.6

Paul Prescod python-dev@python.org
Fri, 15 Sep 2000 10:09:22 -0700


Update of /cvsroot/python/python/dist/src/Lib/xml/dom
In directory slayer.i.sourceforge.net:/tmp/cvs-serv7711

Modified Files:
	minidom.py 
Log Message:
Fixed bug that disallowed processing instructions before and after
document element.


Index: minidom.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** minidom.py	2000/07/21 22:05:49	1.5
--- minidom.py	2000/09/15 17:09:19	1.6
***************
*** 397,404 ****
  
      def appendChild( self, node ):
!         if node.nodeType==Node.ELEMENT_NODE and self.documentElement:
!             raise TypeError, "Two document elements disallowed"
!         else:
!             self.documentElement=node
          Node.appendChild( self, node )
          return node
--- 397,405 ----
  
      def appendChild( self, node ):
!         if node.nodeType==Node.ELEMENT_NODE:
!             if self.documentElement:
!                 raise TypeError, "Two document elements disallowed"
!             else:
!                 self.documentElement=node
          Node.appendChild( self, node )
          return node