9 print("Usage: " + sys.argv[0] + " <diameter xml file>")
13 with open(file, 'r') as myfile:
16 print("ERROR reading '" + file + "'")
19 # although default attribute prefix is '@', anyway we will
20 # force the value just in case xmltodict implementation
21 # changes. The anna::core::functions::json2xml helper,
22 # assumes this prefix in order to work properly.
23 my_dict=xmltodict.parse(xml, attr_prefix='@')
24 json_data=json.dumps(my_dict, indent=3, sort_keys=True)