code: def toxml(self):
          
  
          return '<EventConnection' +\
            (' from="{0}"'.format(self.from_) if self.from_ else '') +\
            (' to="{0}"'.format(self.to) if self.to else '') +\
            (' sourcePort="{0}"'.format(self.source_port) if self.source_port else '') +\
            (' targetPort="{0}"'.format(self.target_port) if self.target_port else '') +\
            (' receiver="{0}"'.format(self.receiver) if self.receiver else '') +\
            (' receiverContainer="{0}"'.format(self.receiver_container) if self.receiver_container else '') +\
            '/>'
docs: Exports this object into a LEMS XML object