code: def get_result_xml(result):
      
      result_xml = Element('result')
      for name, value in [('name', result['name']),
                          ('type', ResultType.get_str(result['type'])),
                          ('severity', result['severity']),
                          ('host', result['host']),
                          ('test_id', result['test_id']),
                          ('port', result['port']),
                          ('qod', result['qod'])]:
          result_xml.set(name, str(value))
      result_xml.text = result['value']
      return result_xml
docs: Formats a scan result to XML format.
  
      Arguments:
          result (dict): Dictionary with a scan result.
  
      Return:
          Result as xml element object.