【发布时间】:2020-10-24 10:50:12
【问题描述】:
我用另一种语言写了一些字符串并将其保存到 xml 文件中,但字符串看起来像
# A part of the xml: recipientname="Калик Мамадо.."
tree.write(new_file_name) # Tree is a xml (ElementTree.parse(file))
with open(new_file_name, 'r') as xml_document:
xml = xml_document.read().replace('\n', '')
如何将其解码为普通字符串?
【问题讨论】: