Created
April 24, 2023 15:46
-
-
Save pchatterjee/cf996f2b7b3ca852eceb640b12aeeb43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xmltodict | |
import json | |
with open("quotes.xml") as xml_file: | |
data_dict = xmltodict.parse(xml_file.read()) | |
json_data = json.dumps(data_dict, indent=2) | |
print(json_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment