#NEWLINE# def setText( dom , node , text ) : #NEWLINE# #INDENT# for currNode in node . childNodes : #NEWLINE# #INDENT# if ( currNode . nodeType == currNode . TEXT_NODE ) : #NEWLINE# #INDENT# currNode . data = text #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# textNode = dom . createTextNode ( text ) #NEWLINE# node . appendChild ( textNode )