我有以下xml:
<Earth>
<country name="Česká republika" population="8900000">
<capital>Praha1</capital>
</country>
</Earth>
但是当我尝试解析它失败并出现错误:
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 2, column 20
我的代码:
tree=etree.parse(input) # input -> file.xml