I need a python code to read XML file from this URL (https://www.treasury.gov/ofac/downloads/consolidated/consolidated.xml). And convert this XML to XLSX file. So, this will be an automated code. Whenever i run this it will directly read from URL and it should save as XLSX. So that i will save in database on regular basis.
This link(https://cdkm.com/xml-to-xls) is actually reading XML from URL and converting to XLSX(In which format i need). But this is manual work. we need automated one, so that we can run the code regularly.
I have tried different methods, like convert XML to JSON to XLSX still not working. The main problem is that there are many columns which have same names. So, the conversion of XML to XLSX is not coming properly. Can any one please help me out solving this. Thanks in advance.