This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author flox
Recipients flox
Date 2010-10-17.13:42:17
SpamBayes Score 1.6864744e-08
Marked as misclassified No
Message-id <1287322940.78.0.0838139062813.issue10131@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import copy
>>> from xml.dom import minidom

>>> doc = minidom.parseString('<root/>')
>>> doc2 = copy.deepcopy(doc)

>>> doc.toxml()
u'<?xml version="1.0" ?><root/>'
>>> doc2.toxml()
u'<?xml version="1.0" ?><root/><root/>'
>>> minidom.parseString(doc2.toxml())
Traceback (most recent call last):
...
ExpatError: junk after document element: line 1, column 2


The workaround is to use doc.cloneNode(True).
History
Date User Action Args
2010-10-17 13:42:20floxsetrecipients: + flox
2010-10-17 13:42:20floxsetmessageid: <1287322940.78.0.0838139062813.issue10131@psf.upfronthosting.co.za>
2010-10-17 13:42:19floxlinkissue10131 messages
2010-10-17 13:42:17floxcreate