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 xrotwang
Recipients xrotwang
Date 2008-06-20.15:16:18
SpamBayes Score 0.007959298
Marked as misclassified No
Message-id <1213974981.57.0.313909578004.issue3151@psf.upfronthosting.co.za>
In-reply-to
Content
when serializing elementtrees with weird namespaces like {$stuff}, the
generated xml is not valid:

Python 2.5.1 (r251:54863, Mar  7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2

IDLE 1.2.1      ==== No Subprocess ====
>>> from xml.etree import ElementTree as et
>>> e = et.fromstring('<prefix:localname xmlns:prefix="${stuff}"/>')
>>> e.tag
'{${stuff}}localname'
>>> t = et.ElementTree(e)
>>> from StringIO import StringIO
>>> f = StringIO()
>>> t.write(f)
>>> f.seek(0)
>>> print f.read()
<ns0:}localname xmlns:ns0="${stuff" />
History
Date User Action Args
2008-06-20 15:16:22xrotwangsetspambayes_score: 0.0079593 -> 0.007959298
recipients: + xrotwang
2008-06-20 15:16:21xrotwangsetspambayes_score: 0.0079593 -> 0.0079593
messageid: <1213974981.57.0.313909578004.issue3151@psf.upfronthosting.co.za>
2008-06-20 15:16:20xrotwanglinkissue3151 messages
2008-06-20 15:16:19xrotwangcreate