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 2015年04月02日 07:01 by rhettinger, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg239879 - (view) | Author: Raymond Hettinger (rhettinger) * (Python committer) | Date: 2015年04月02日 07:01 | |
The xml.dom.minidom package has as a xml.toprettyxml() function that has the problem of altering the whitespace of the text of elements. The ElementTree module needs a prettify option that works better, perhaps something based of Effbot's code at: http://effbot.org/zone/element-lib.htm#prettyprint The lxml package also provides an API for this purpose: print(etree.tostring(root, pretty_print=True)) |
|||
| msg239881 - (view) | Author: Stefan Behnel (scoder) * (Python committer) | Date: 2015年04月02日 07:08 | |
duplicate of issue 14465 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:15 | admin | set | github: 68035 |
| 2018年08月17日 15:22:53 | mcepl | set | versions: + Python 3.6, Python 3.7, Python 3.8 |
| 2015年04月02日 08:20:47 | serhiy.storchaka | set | status: open -> closed superseder: xml.etree.ElementTree: add feature to prettify XML output resolution: duplicate stage: resolved |
| 2015年04月02日 07:08:34 | scoder | set | nosy:
+ rhettinger messages: + msg239881 |
| 2015年04月02日 07:02:41 | rhettinger | set | nosy:
+ scoder, eli.bendersky, - rhettinger |
| 2015年04月02日 07:01:50 | rhettinger | create | |