@classmethod
    def is_valid_instance(cls, filepath):
        if not filepath.endswith(".xml"):
            return False
        with open(filepath, 'r') as ff:
            fxml = ff.read().strip()
            if fxml.startswith('<?xml'):
                return True
            if 'http://opendatakit.org/submissions' in fxml:
                return True
        return False
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/apps/logger/xform_fs.py/XFormInstanceFS.is_valid_instance/original