Python: how to serialize JSON into XML? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 5

Python: how to serialize JSON into XML?

I have to query an API endpoint to get lots of data objects. The tech stack used in the next steps requires me to convert the objects into XML. I used an intermediary python script for getting the data, so I have the JSON already. How do I create an XML tree from there? Any hints or preexisting python scripts to use as a reference? Thanks in advance...

27th May 2021, 9:09 PM
::sк::
::sк:: - avatar
2 Antworten
+ 1
read the doc... there is a builtin module called 'xml' wich could be used to parse/build xml strings: https://docs.python.org/3/library/xml.html
27th May 2021, 9:14 PM
visph
visph - avatar