我在结构中有一个巨大的XML,如下图所示。我需要把它解析成一个数据帧。我的数据帧将包含FinInstrmGnlAttrbts_ID
、FinInstrmGnlAttrbts_FullName
等列。
我不知道如何在Python中遍历XML标记结构。你知道吗
import xml.etree.ElementTree as et
_xt = et.parse("DLTINS_20171019_01of01.xml")
_xr = _xt.getroot()
_xr
for child in _xr:
print (child.tag, child.attrib)
它给了我
{urn:iso:std:iso:20022:tech:xsd:head.003.001.01}Hdr {}
{urn:iso:std:iso:20022:tech:xsd:head.003.001.01}Pyld {}
目前没有回答
相关问题 更多 >
编程相关推荐