#NEWLINE# def setInnerText( elem , text ) : #NEWLINE# #INDENT# while ( elem . firstChild is not None ) : #NEWLINE# #INDENT# elem . removeChild ( elem . firstChild ) #NEWLINE# #UNINDENT# elem . appendChild ( createTextNode ( ( text or '' ) ) )