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

        chxmlstr = ''

        for run in self.runs:
            chxmlstr += run.toxml()

        for record in self.records:
            chxmlstr += record.toxml()

        for event_record in self.event_records:
            chxmlstr += event_record.toxml()

        for data_display in self.data_displays:
            chxmlstr += data_display.toxml()

        for data_writer in self.data_writers:
            chxmlstr += data_writer.toxml()

        for event_writer in self.event_writers:
            chxmlstr += event_writer.toxml()

        if chxmlstr:
            xmlstr = '<Simulation>' + chxmlstr + '</Simulation>'
        else:
            xmlstr = ''

        return xmlstr