#NEWLINE# def _etree_to_dict( t ) : #NEWLINE# #INDENT# d = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for child in t : #NEWLINE# #INDENT# d [ child . tag ] = _etree_to_dict ( child ) #NEWLINE# #UNINDENT# return ( child or t . text )