I want to convert the data in webservice url ='http://services.groupkt.com/country/get/all' into xml format using Python / Unix. Please suggest.
Asked
Active
Viewed 50 times
0
-
1Welcome to SO. Please show what code you have tried to get this to work – Fuzzybear Jul 23 '18 at 22:30
-
In unix i tried, curl -o data.xml "http://services.groupkt.com/country/get/all". to save the data in data.xml, but its did not get saved in proper xml format, just the data got fetched. – Souvik Pal Jul 23 '18 at 22:41
-
And i python I tried, import requests resp = requests.get('http://services.groupkt.com/country/get/all') with open('C:/Users/Souvik/PycharmProjects/NewProject/export.xml', 'wb') as foutput: foutput.write(resp.content) The same thing happened, just the data got saved in the format that is in the webservice, not in xml format. – Souvik Pal Jul 23 '18 at 22:44