def toxml(self):
        """
        Exports this object into a LEMS XML object
        """

        return '<ComponentReference name="{0}" type="{1}"'.format(self.name, self.type) + \
          (' local = "{0}"'.format(self.local) if self.local else '') + \
            '/>'
def toxml ( self ) : return '<ComponentReference name="{0}" type="{1}"' . format ( self . name , self . type ) + ( ' local = "{0}"' . format ( self . local ) if self . local else '' ) + '/>'
Exports this object into a LEMS XML object