def read(self, file): dtd = DTD(file) for entity in dtd.entities(): unit = Unit(entity.name, entity.content) self.units.append(unit)