I\'m currently using the toprettyxml() function of the xml.dom module in a Python script and I\'m having some trouble with the newlines. If don\'t
toprettyxml()
xml.dom
Are you viewing the resulting file on Windows? If so, try using toprettyxml(newl='\r\n').
toprettyxml(newl='\r\n')