XML File to Dictionary
import xmltodict
import pprint
import json
with open('sample.xml') as fd:
doc1 = xmltodict.parse(fd.read())
doc1
OrderedDict([('note',
OrderedDict([('to', 'Tove'),
('from', 'Jani'),
('heading', 'Reminder'),
('body', "Don't forget me this weekend!")]))])
doc1['note']['heading']
'Reminder'