import xmltodict
      
      with open(xmlfile, 'r', encoding='utf-8') as file:
        my_xml = file.read()
        my_dict = xmltodict.parse(my_xml)
      
      Python language logo

      Read XML file into dictionary

      Python public recipes

      Shortcut: xml.file.read-as-dict

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.