将xml读出 with open('file.xml') as fd: doc = xmltodict.parse(fd.read()) print(doc['mydocument']['@has']) # == u'an attribute' ...
確定! 回上一頁