#NEWLINE# def _to_list( self , l ) : #NEWLINE# #INDENT# l . extend ( ( '<' , self . __tag__ ) ) #NEWLINE# for ( name , value ) in self . __attributes__ . iteritems ( ) : #NEWLINE# #INDENT# ( name , value ) = self . _handle_attribute ( name , value ) #NEWLINE# l . extend ( ( ' ' , name , '="' , escape ( value ) , '"' ) ) #NEWLINE# #UNINDENT# l . append ( '>' ) #NEWLINE# for child in self . __children__ : #NEWLINE# #INDENT# x_base . _render_child_to_list ( child , l ) #NEWLINE# #UNINDENT# l . extend ( ( '</' , name . __tag__ , '>' ) )