the following is the code to convert single files , how to work if there are multiple xml files:
import xmltodict
import json
with open("demo.xml") as xml_file:
data_dict = xmltodict.parse(xml_file.read())
json_data = json.dumps(data_dict)
with open("datas.json", "w") as json_file:
json_file.write(json_data)
Im getting correct output for single file but how to execute for many files