#NEWLINE# def createNodeDict( t1 ) : #NEWLINE# #INDENT# tkvt1 = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for c in t1 . iter ( ) : #NEWLINE# #INDENT# if c . attrib : #NEWLINE# #INDENT# txt = normalize ( c . text_content ( ) ) #NEWLINE# for ( k , v ) in c . attrib . items ( ) : #NEWLINE# #INDENT# key = ( c . tag , k , v , t1 ) #NEWLINE# if ( key in tkvt1 ) : #NEWLINE# #INDENT# tkvt1 [ key ] . append ( c ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tkvt1 [ key ] = [ c ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return tkvt1