Problem with newlines when I use toprettyxml()

前端 未结 8 892
不知归路
不知归路 2020-11-28 15:17

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

8条回答
  •  孤街浪徒
    2020-11-28 15:38

    Are you viewing the resulting file on Windows? If so, try using toprettyxml(newl='\r\n').

提交回复
热议问题