python convert dict to xml

Solutions on MaxInterview for python convert dict to xml by the best coders in the world

showing results for - "python convert dict to xml"
Elisa
11 Aug 2019
1from dicttoxml import dicttoxml
2
3array = [
4    {
5        'time': {"hour":"1", "minute":"30","seconds": "40"}
6    },
7    {
8        'place': {"street":"40 something", "zip": "00000"}
9    }
10]
11
12xml = dicttoxml(array, custom_root='test', attr_type=False)
13