Skip to content

Instantly share code, notes, and snippets.

@Allwin12
Created June 16, 2020 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Allwin12/a538b594bb74a5a05b0a8fc7e55d8d83 to your computer and use it in GitHub Desktop.
Save Allwin12/a538b594bb74a5a05b0a8fc7e55d8d83 to your computer and use it in GitHub Desktop.
from json2xml import json2xml
from json2xml.utils import readfromurl, readfromstring, readfromjson
data = readfromurl("http://api.plos.org/search?q=title:%22Drosophila%22%20and%20body:%22RNA%22&fl=id&start=1&rows=10")
print(json2xml.Json2xml(data, attr_type=False).to_xml())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment