conda install -c conda-forge xmltodict
上記でインストール
import xmltodict import json with open('data.xml', 'r') as f: xml_data = f.read() dictionary = xmltodict.parse(xml_data) json_object = json.dumps(dictionary) print(json_object)
conda install -c conda-forge xmltodict
上記でインストール
import xmltodict import json with open('data.xml', 'r') as f: xml_data = f.read() dictionary = xmltodict.parse(xml_data) json_object = json.dumps(dictionary) print(json_object)