I have a massive XML in the structure as show in the picture below. I need to parse this into a dataframe. My Dataframe would contain columns such as FinInstrmGnlAttrbts_ID
, FinInstrmGnlAttrbts_FullName
, etc.
I have no idea how to traverse XML tag structures in Python.
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)
it gives me
{urn:iso:std:iso:20022:tech:xsd:head.003.001.01}Hdr {}
{urn:iso:std:iso:20022:tech:xsd:head.003.001.01}Pyld {}