def _generate_tables(self, files):
        pa_table_names = list(self.config.features) if self.config.features is not None else ["xml"]
        for file_idx, file in enumerate(itertools.chain.from_iterable(files)):
            # open in text mode, by default translates universal newlines ("\n", "\r\n" and "\r") into "\n"
            with open(file, encoding=self.config.encoding, errors=self.config.encoding_errors) as f:
                xml = f.read()
                pa_table = pa.Table.from_arrays([pa.array([xml])], names=pa_table_names)
                yield file_idx, self._cast_table(pa_table)