file with getrootfrom lxml import objectify path 'performance_mnr xmlparsed objectify parse(open(path)root parsed getroot(root indicator return generator yielding each xml element for each recordwe can populate dict of tag names (like ytd_actualto data values (excluding few tags)data [skip_fields ['parent_seq''indicator_seq''desired_change''decimal_places'for elt in root indicatorel_data {for child in elt getchildren()if child tag in skip_fieldscontinue el_data[child tagchild pyval data append(el_datalastlyconvert this list of dicts into dataframein [ ]perf dataframe(datain [ ]perf out[ ]empty dataframe columnsarray([]dtype=int indexarray([]dtype=int xml data can get much more complicated than this example each tag can have metadatatoo consider an html link tag which is also valid xmlfrom stringio import stringio tag '< href="root objectify parse(stringio(tag)getroot(you can now access any of the fields (like hrefin the tag or the link textin [ ]root out[ ]in [ ]root get('href'out[ ]'in [ ]root text out[ ]'google data loadingstorageand file formats www it-ebooks info