How to convert below xml file into dataframe using python

Viewed 42

The below image is xml file which i need to create DataFrame

This is final output need from xml file

#import packages
import xml.etree.ElementTree as ETree
import pandas as pd 
#Load and parse the input file 
Tree=ETree.parse("data_list.xml") #Give input file path
root=Tree.getroot() #xml file parsed done 
root

root.tag
for child in root:
print(child.tag, child.attrib)
column=[]
for country in root.findall('FieldList'):
    print(list(country))
    for f in country:
        i=f.get('Field')
        print(i)

output i am getting None None None None None None None None

0 Answers
Related