← 输入框|bugs.python.org|刷新

➜

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.

作者 rhettinger
收信人 rhettinger
日期 2015-04-02.07:01:49
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1427958110.33.0.788273316254.issue23847@psf.upfronthosting.co.za>
In-reply-to
内容
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))
历史
日期 用户 动作 参数
2015-04-02 07:01:50rhettinger修改recipients: + rhettinger
2015-04-02 07:01:50rhettinger修改messageid: <1427958110.33.0.788273316254.issue23847@psf.upfronthosting.co.za>
2015-04-02 07:01:50rhettinger链接issue23847 messages
2015-04-02 07:01:49rhettinger创建