Ezio Melotti <ezio.melo...@gmail.com> added the comment: If I understood correctly, the correct behavior while reading is: * literal newlines (\n or \r) and tabs (\t) should be collapsed and converted to a space * newlines (
 or 
) and tabs (	) as entities should be converted to the literal equivalents (\n, \r and \t)
(See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping) This should be ok in both xml.minidom and etree. Instead, while writing, if literal newlines and tabs are written as they are (\n, \r and \t), they can't be read during the parsing phase because they are collapsed and converted to a space. They should therefore be converted to entities (
, 
 and 	) automatically, but this could be incompatible with the current behavior (i.e. \n, \r or \t that now are written and collapsed as a space during the parsing will then become significant). Moriyoshi, can you confirm that what I said is correct and the problem is similar to the one described in #5752? I also closed #6492 as duplicate of this. ---------- nosy: +devon, ezio.melotti versions: +Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7139> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com