#NEWLINE# def getXMLtextElement( dom_node , name ) : #NEWLINE# #INDENT# 'Returns the text value of the first item found with the given\n    tagname' #NEWLINE# value = None #NEWLINE# subelements = dom_node . getElementsByTagName ( name ) #NEWLINE# if subelements : #NEWLINE# #INDENT# value = '' #NEWLINE# for node in subelements [ 0 ] . childNodes : #NEWLINE# #INDENT# value += node . nodeValue #NEWLINE# #UNINDENT# #UNINDENT# return value