#NEWLINE# def to_tree( self ) : #NEWLINE# #INDENT# attrs = dict ( self ) #NEWLINE# if ( 'id' in attrs ) : #NEWLINE# #INDENT# attrs [ ( '{%s}id' % REL_NS ) ] = attrs [ 'id' ] #NEWLINE# del attrs [ 'id' ] #NEWLINE# #UNINDENT# return Element ( self . tagname , attrs )