#NEWLINE# def _Replacement_writexml( self , writer , indent = '' , addindent = '' , newl = '' ) : #NEWLINE# #INDENT# writer . write ( ( ( indent + '<' ) + self . tagName ) ) #NEWLINE# attrs = self . _get_attributes ( ) #NEWLINE# a_names = attrs . keys ( ) #NEWLINE# a_names . sort ( ) #NEWLINE# for a_name in a_names : #NEWLINE# #INDENT# writer . write ( ( ' %s="' % a_name ) ) #NEWLINE# _Replacement_write_data ( writer , attrs [ a_name ] . value , is_attrib = True ) #NEWLINE# writer . write ( '"' ) #NEWLINE# #UNINDENT# if self . childNodes : #NEWLINE# #INDENT# writer . write ( ( '>%s' % newl ) ) #NEWLINE# for node in self . childNodes : #NEWLINE# #INDENT# node . writexml ( writer , ( indent + addindent ) , addindent , newl ) #NEWLINE# #UNINDENT# writer . write ( ( '%s</%s>%s' % ( indent , self . tagName , newl ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# writer . write ( ( '/>%s' % newl ) )