'@return XML tag representing the object
@rtype: xml.etree.ElementTree.Element'

def xml(self, time_taken, out, err):

    test_suite = ET.Element('testsuite')
    test_suite.set('errors', str(len(self.errors)))
    test_suite.set('failures', str(len(self.failures)))
    test_suite.set('name', self._test_name)
    test_suite.set('tests', str(self.testsRun))
    test_suite.set('time', ('%.3f' % time_taken))
    for info in self._tests:
        test_suite.append(info.xml())
    system_out = ET.SubElement(test_suite, 'system-out')
    system_out.text = cdata(self.filter_nonprintable_text(out))
    system_err = ET.SubElement(test_suite, 'system-err')
    system_err.text = cdata(self.filter_nonprintable_text(err))
    return ET.ElementTree(test_suite)
