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.
Created on 2008年06月20日 15:16 by xrotwang, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| etree.patch | amaury.forgeotdarc, 2008年06月20日 20:48 | |||
| Messages (4) | |||
|---|---|---|---|
| msg68463 - (view) | Author: robert forkel (xrotwang) | Date: 2008年06月20日 15:16 | |
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" />
|
|||
| msg68475 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2008年06月20日 20:48 | |
A one-letter fix :-) (the localname cannot contain special characters) |
|||
| msg99397 - (view) | Author: Florent Xicluna (flox) * (Python committer) | Date: 2010年02月16日 11:58 | |
Thanks for the one-letter fix. Test added to the upgrade proposed on #6472. |
|||
| msg100862 - (view) | Author: Florent Xicluna (flox) * (Python committer) | Date: 2010年03月11日 14:53 | |
Fixed in trunk. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:35 | admin | set | github: 47401 |
| 2010年03月11日 14:53:28 | flox | set | status: open -> closed superseder: Update ElementTree with upstream changes messages: + msg100862 dependencies: - Update ElementTree with upstream changes resolution: fixed stage: patch review -> resolved |
| 2010年02月16日 11:58:48 | flox | set | versions:
+ Python 3.2 nosy: + flox messages: + msg99397 dependencies: + Update ElementTree with upstream changes |
| 2009年07月04日 03:22:11 | ezio.melotti | set | priority: normal stage: patch review versions: + Python 2.7, - Python 2.5 |
| 2008年06月20日 23:36:07 | akuchling | set | keywords: + easy |
| 2008年06月20日 20:48:04 | amaury.forgeotdarc | set | files:
+ etree.patch assignee: effbot messages: + msg68475 keywords: + patch nosy: + amaury.forgeotdarc, effbot |
| 2008年06月20日 15:16:20 | xrotwang | create | |