def toxml(self):
        """
        Exports this object into a LEMS XML object
        """
        argstr = ''
        if self.component:
            argstr += 'component="{0}" '.format(self.component)
        if self.component_type:
            argstr += 'componentType="{0}" '.format(self.component_type)
        if self.number:
            argstr += 'number="{0}" '.format(self.number)
        if self.assignments:
            chxmlstr = ''
            for assign in self.assignments:
                chxmlstr += assign.toxml()
            return '<MultiInstantiate {0}>{1}</MultiInstantiate>'.format(argstr, chxmlstr)
        else:
            return '<MultiInstantiate {0}/>'.format(argstr)