【发布时间】:2017-10-09 11:24:12
【问题描述】:
我正在尝试解析我的 xml 文件,我认为它可以工作,但是当我打印坐标时,我只能在控制台上得到这个:“[ ]”。
我的代码如下所示:
tree = ET.parse(url)
root = tree.getroot()
namespaces = {'gml': 'http://www.opengis.net/gml#'}
print(root.findall('gml:coordinates', namespaces))
【问题讨论】:
标签: python python-3.x xml-parsing