'Writes the Xunit file.'

def genfile(self):

    self._stats['total'] = (((self._stats['error'] + self._stats['fail']) + self._stats['pass']) + self._stats['skip'])
    xml_chunks = [('<?xml    version="1.0"    encoding="UTF-8"?><testsuite    name="w3aftestscripts"    tests="%(total)d"    errors="%(error)d"    failures="%(fail)d"    skip="%(skip)d">' % self._stats)]
    xml_chunks.append(''.join(self.results))
    xml_chunks.append('</testsuite>')
    with open(self.outputfile, 'w') as output:
        output.write(parseString(''.join(xml_chunks)).toprettyxml())
    om.out.information(('XML    output    file    was    successfuly    generated:    %s' % self.outputfile))
