Convert between "xml" and "dict".
Project description
Utils for converting strings between "xml" and "dict" formats.
This package contains functions:
xml2dict(xml-string) -> dictionary
dict2xml(dictionary) -> xml-string
Examples:
>>>xmldict_translate.dict2xml(dict(a=[dict(b=[{'_value_': 'something'}], _attrs_={'y': 10})]))
<?xml version="1.0" encoding="UTF-8"?>
<a y="10">
<b>
something
</b>
</a>
This package contains functions:
xml2dict(xml-string) -> dictionary
dict2xml(dictionary) -> xml-string
Examples:
>>>xmldict_translate.dict2xml(dict(a=[dict(b=[{'_value_': 'something'}], _attrs_={'y': 10})]))
<?xml version="1.0" encoding="UTF-8"?>
<a y="10">
<b>
something
</b>
</a>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.