#NEWLINE# def _AddMembersToElementTree( self , tree ) : #NEWLINE# #INDENT# for child in self . extension_elements : #NEWLINE# #INDENT# child . _BecomeChildElement ( tree ) #NEWLINE# #UNINDENT# for ( attribute , value ) in self . extension_attributes . iteritems ( ) : #NEWLINE# #INDENT# if value : #NEWLINE# #INDENT# if ( isinstance ( value , unicode ) or ( MEMBER_STRING_ENCODING is unicode ) ) : #NEWLINE# #INDENT# tree . attrib [ attribute ] = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tree . attrib [ attribute ] = value . decode ( MEMBER_STRING_ENCODING ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if self . text : #NEWLINE# #INDENT# if ( isinstance ( self . text , unicode ) or ( MEMBER_STRING_ENCODING is unicode ) ) : #NEWLINE# #INDENT# tree . text = self . text #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tree . text = self . text . decode ( MEMBER_STRING_ENCODING )