In Eclipse, copy and paste the following program to create a new module:
import xmltodict
import json
import urllib.request
fileIn=urllib.request.urlopen('http://personal.cityu.edu.hk/~dcywchan/1718SemB121COM/client.xml')
byteStr = fileIn.read()
lines=byteStr.decode('utf-8')
dl=xmltodict.parse(lines)
print(json.dumps(dl,indent=4))
newdl=[]
for e in dl['root']['item']:
tmpdl={}
for key,value in e.items():
if key != "@type":
value=value["#text"]
tmpdl.update({key:value})
newdl.append(tmpdl)
#print out dictionary list created