deleted files
Please enter the commit message for your changes. Lines starting
This commit is contained in:
17
xml_json.py
17
xml_json.py
@@ -1,17 +0,0 @@
|
||||
import xmltodict
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
|
||||
|
||||
basepath= Path('DRAMSys/library/resources/configs/mcconfigs')
|
||||
for path in basepath.iterdir():
|
||||
if path.is_file():
|
||||
filename=str(path)
|
||||
if filename.endswith('.xml'):
|
||||
# if os.stat(path).st_size != 0: #check if it is empty
|
||||
with open(path, "r") as in_file:
|
||||
xml = in_file.read()
|
||||
with open(filename.replace(".xml",".json"), 'w') as out_file:
|
||||
json.dump(xmltodict.parse(xml), out_file)
|
||||
Reference in New Issue
Block a user