: import os from xml.etree import ElementTree file_name = "example.xml" full_file = os.path.abspath(os.path.join("xml", file_name)) dom = ElementTree.parse(full_file) Fruit = dom.findall("Fruit")  for f in Fruit:     