ports/textproc/py-dict2xml/pkg/DESCR

18 lines
263 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Super Simple utility to convert a python dictionary into an xml string.
from dict2xml import dict2xml
data = {
'a': 1,
'b': [2, 3],
'c': {
'd': [
{'p': 9},
{'o': 10}
],
'e': 7
}
}
print (dict2xml(data, wrap="all", indent=" "))