tree.write(datafile,encoding="utf8")#It writes the element tree to a specified file, using the 'utf8' output encoding
tree.write('CMSD_Topology10_Output.xml',encoding="utf8")#It writes the element tree to a specified file, using the 'utf8' output encoding
#================================= Output preparation: output the updated values in the JSON file of Topology10 =========================================================#
jsonFile=open('JSON_Topology10.json','r')#It opens the Topology10 JSON file
...
...
@@ -140,13 +140,15 @@ for element in nodes:
else:
continue
jsonFile=open('JSON_Topology10.json',"w")#It opens the JSON file
jsonFile=open('JSON_Topology10_Output.json',"w")#It opens the JSON file
jsonFile.write(json.dumps(data,indent=True))#It writes the updated data to the JSON file
jsonFile.close()#It closes the file
#================================ Calling the ExcelOutput object, outputs the outcomes of the statistical analysis in Excel files =============================================#