We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have this problem, I need to create someting like this:
<root> <item1>value</item1> <item2>value</item2> <item3>value</item3> <item4> <i4>value</i4> <i4>value1</i4> <i4>value2</i4> </item4> <item5> <i5>value</i5> <i5>value1</i5> <i5>value2</i5> </item5> </root>
item4 is a list and i4 is a dict.
Mostly it works fine, if I set:
my_item_func = lambda x: 'i4' xml = dicttoxml.dicttoxml(form, item_func=my_item_func)
And the key is named 'item4' I have the desired results.
The problem is that the items in the second list i5 are named also i4, as I can set only one function to name the items.
I tried to set the item func as:
my_item_func = lambda x: x But I get item4 and item5 instead of i4 and i5.
my_item_func = lambda x: x
There is any way to get the desired results.
Thanks a lot.
The text was updated successfully, but these errors were encountered:
Did anyone solve this problem?
Sorry, something went wrong.
may be converted to json
{ "root": { "item1": "value", "item2": "value", "item3": "value", "item4": { "i4": [ "value", "value1", "value2" ] }, "item5": { "i5": [ "value", "value1", "value2" ] } }, "#omit-xml-declaration": "yes" }
https://xmltojson.github.io/
No branches or pull requests
I have this problem, I need to create someting like this:
item4 is a list and i4 is a dict.
Mostly it works fine, if I set:
And the key is named 'item4' I have the desired results.
The problem is that the items in the second list i5 are named also i4, as I can set only one function to name the items.
I tried to set the item func as:
my_item_func = lambda x: x
But I get item4 and item5 instead of i4 and i5.
There is any way to get the desired results.
Thanks a lot.
The text was updated successfully, but these errors were encountered: