Hello guys, I've a program that reads a xml document from a socket, so I've the xml document stored in a string which I would like to convert directly to a python dictionary, the same way it is done in django's simplejson library.
Take as an example:
str ="<?xml version="1.0" ?><person><name>john</name><age>20</age></person"
dic_xml = convert_to_dic(str)
Then dic_xml would look like {'person' : { 'name' : 'john', 'age' : 20 } }
Thanks in advance, Ze Maria