cpython: fa0b1e50270f (original) (raw)

Mercurial > cpython

changeset 72571:fa0b1e50270f

merge #4147: minidom's toprettyxml no longer adds whitespace to text nodes. [#4147]

R David Murray rdmurray@bitdance.com
date Sat, 01 Oct 2011 16:22:35 -0400
parents 90a06fbb1f85(current diff)086ca132e161(diff)
children 9124a00df142
files Lib/test/test_minidom.py Misc/ACKS Misc/NEWS
diffstat 4 files changed, 14 insertions(+), 2 deletions(-)[+] [-] Lib/test/test_minidom.py 7 Lib/xml/dom/minidom.py 6 Misc/ACKS 1 Misc/NEWS 2

line wrap: on

line diff

--- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -467,6 +467,13 @@ class MinidomTest(unittest.TestCase): dom.unlink() self.confirm(domstr == str.replace("\n", "\r\n"))

+ def testProcessingInstruction(self): dom = parseString('') pi = dom.documentElement.firstChild

--- a/Lib/xml/dom/minidom.py +++ b/Lib/xml/dom/minidom.py @@ -836,7 +836,9 @@ class Element(Node): _write_data(writer, attrs[a_name].value) writer.write(""") if self.childNodes:

@@ -1061,7 +1063,7 @@ class Text(CharacterData): return newText def writexml(self, writer, indent="", addindent="", newl=""):

# DOM Level 3 (WD 9 April 2002)

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -496,6 +496,7 @@ Lou Kates Hiroaki Kawai Sebastien Keim Ryan Kelly +Dan Kenigsberg Robert Kern Randall Kern Magnus Kessler

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -294,6 +294,8 @@ Core and Builtins Library ------- +- Issue #4147: minidom's toprettyxml no longer adds whitespace to text nodes. +