Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue14465>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to