對比其他Python 處理XML 的方案, xml.etree. ... 遞迴查詢所有的neighbor 子結點 for neighbor in root.iter('neighbor'): print neighbor.attrib.
確定! 回上一頁