code: def write_xml(self, as_string=False):
          
          if not as_string:
              et.ElementTree(self.xmlreport).write('{}/{}.xml'.format(self.outpath, self.outputprefix), pretty_print=True, xml_declaration=True)
          else:
              output = et.tostring(self.xmlreport, pretty_print=True)
              if config.RAWSTRING:
                  output = repr(output)
              print(output)
docs: Write the XML report