def parse(self, inputfile):
        #parse the xml file
        root = ET.parse(inputfile)

        # storing the language in the metadata dictionary
        language = root.getroot()
        self.metadata['lang'] = language.get('code', default='und')
        self._full_lang = language.get('name', default=None)

        sources = root.findall('sources/source')
        for source in sources:

            # incrementing record record_id
            self._current_ids['record'] = self._current_ids['seq']
            self._current_ids['seq'] += 1

            # build the metadata for the current record
            record_metadata = self._build_source_metadata(source)
            record_id = 'a{0}'.format(self._current_ids['record'])
            # annotate source element (acts as record level)
            self._annotations_for_parent[(None, self._record_tag)].append(
                poioapi.io.graf.Annotation(record_id, ''))

            self.metadata[record_id] = record_metadata

            # each source element only has a single igt element. so it should
            # be safe to do this
            examples = source.findall('igt/example')
            for example in examples:
                if self._build_tier_block(example):
                    self._handle_example_element(record_id)
                    self._init_tier_block()
Main parsing function for ODIN files.
dataset/ETHPy150Open cidles/poio-api/src/poioapi/io/odin.py/Parser.parse