code: def get_schema_version_from_xml(xml):
      
      if isinstance(xml, six.string_types):
          xml = StringIO(xml)
      try:
          tree = ElementTree.parse(xml)
      except ParseError:
          # Not an XML file
          return None
      root = tree.getroot()
      return root.attrib.get('schemaVersion', None)
docs: Get schemaVersion attribute from OpenMalaria scenario file
      xml - open file or content of xml document to be processed