import xmltodict. with open("test.xml") as fd: # 将XML文件装载到dict里面 doc = xmltodict.parse(fd.read()) print(doc["mydocument"]["@has"]) ...
確定! 回上一頁