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