← 输入框|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
收信人 Andrew Grant, Clayton Olney, alex.dzyoba, alex.henderson, eli.bendersky, eric.araujo, eric.snow, loewis, martin.panter, mcepl, mitar, rhettinger, santoso.wijaya, scoder, serhiy.storchaka, tshepang, vstinner, wolma
日期 2019-08-10.03:08:27
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1565406507.88.0.972939200448.issue14465@roundup.psfhosted.org>
In-reply-to
内容
FWIW, here is the relevant section of the XML specification, https://www.w3.org/TR/2008/REC-xml-20081126/#sec-white-space :

"""In editing XML documents, it is often convenient to use "white space" (spaces, tabs, and blank lines) to set apart the markup for greater readability. Such white space is typically not intended for inclusion in the delivered version of the document. On the other hand, "significant" white space that should be preserved in the delivered version is common, for example in poetry and source code.

An XML processor must always pass all characters in a document that are not markup through to the application. A validating XML processor must also inform the application which of these characters constitute white space appearing in element content.
"""

OTOH, the java TransformerFactory does support a property, OutputKeys.INDENT, so there is a precedent for this feature request.

Stefan, would you please make a final determination or pronouncement on whether this makes sense for ElementTree or whether it is outside the scope of what the module is trying to accomplish.
历史
日期 用户 动作 参数
2019-08-10 03:08:27rhettinger修改recipients: + rhettinger, loewis, scoder, vstinner, mcepl, eric.araujo, eli.bendersky, mitar, santoso.wijaya, tshepang, eric.snow, martin.panter, serhiy.storchaka, alex.henderson, wolma, alex.dzyoba, Clayton Olney, Andrew Grant
2019-08-10 03:08:27rhettinger修改messageid: <1565406507.88.0.972939200448.issue14465@roundup.psfhosted.org>
2019-08-10 03:08:27rhettinger链接issue14465 messages
2019-08-10 03:08:27rhettinger创建