New submission from Thomas Lee <[EMAIL PROTECTED]>:

For XML elements containing only text data, it would be nice if
toprettyxml could omit the whitespace it normally injects before & after
the text, e.g.

<person>
    <first-name>
        Bob
    </first-name>
</person>

Becomes:

<person>
    <first-name>Bob</first-name>
</person>

>From what I understand the handling of whitespace within XML elements is
application-defined, so I'm classifying this as a nice-to-have feature.
However it should be noted that in our particular case, the existing
behaviour caused a few problems with a third-party system which treated
whitespace as being significant.

----------
components: Library (Lib), XML
files: minidom-toprettyxml-01.patch
keywords: patch
messages: 74978
nosy: thomas.lee
severity: normal
status: open
title: xml.dom.minidom toprettyxml: omit whitespace for text-only elements
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file11832/minidom-toprettyxml-01.patch

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4147>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to