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
Hi everyone.
From this dictionary:
feed = { 'feed': { 'reviewer_images': [ { 'reviewer_image': { 'url': "http://google.com" } }, { 'reviewer_image': { 'url': "http://google.com" } } ] } }
I have got:
<?xml version="1.0" encoding="utf-8"?> <feed> <reviewer_images> <reviewer_image> <url>http://google.com</url> </reviewer_image> </reviewer_images> <reviewer_images> <reviewer_image> <url>http://github.com</url> </reviewer_image> </reviewer_images> </feed>
Is it possible to get several reviewer_image inside identical reviewer_images tag?:
reviewer_image
reviewer_images
<?xml version="1.0" encoding="utf-8"?> <feed> <reviewer_images> <reviewer_image> <url>http://google.com</url> </reviewer_image> <reviewer_image> <url>http://github.com</url> </reviewer_image> </reviewer_images> </feed>
The text was updated successfully, but these errors were encountered:
Having the same issue, any help will be appreciated.
Sorry, something went wrong.
A bit late to the party:
feed = { 'feed': { 'reviewer_images': { 'reviewer_image': [ { 'url': "http://google.com" }, { 'url': "http://google.com" } ] } } } print(xmltodict.unparse(feed, pretty=True))
Result:
<?xml version="1.0" encoding="utf-8"?> <feed> <reviewer_images> <reviewer_image> <url>http://google.com</url> </reviewer_image> <reviewer_image> <url>http://google.com</url> </reviewer_image> </reviewer_images> </feed>
To generate multiple <foo> you have to use { "foo": […] } and not [ {"foo": …}, {"foo": …} ].
<foo>
{ "foo": […] }
[ {"foo": …}, {"foo": …} ]
No branches or pull requests
Hi everyone.
From this dictionary:
I have got:
Is it possible to get several
reviewer_image
inside identicalreviewer_images
tag?:The text was updated successfully, but these errors were encountered: