Brief for PYTHON code to extract data from XML files. Overview We currently have a manual process to extract some information from 100s of XML files. Each file has a large amount of information. Whilst it only takes about 2 / 3 mins we would like a simple PYTHON code to performance this in an automated manner. The manuals steps we do are as follows:
OUTPUT FILE 1 • Open XML using EXCEL • Find “INSTANCE” column > this is the “MASTER COLUMN 1” • Copy entire column and 4 columns to the left and right • Paste the values into another EXCEL • REMOVE BLANK ROWS • Saves as CSV 1 OUTPUT FILE 2 • Open XML using EXCEL • Find “ringstatus_parameter” column > “MASTER COLUMN 2” • Copy entire column and 21 columns right • Paste the values into another EXCEL • REMOVE BLANK ROWS • Saves as CSV 2 Please create a code that can take the INPUT file and produce the 2 Output files. The code must be adaptable so that it’s easy for us to change the “master column 1 or 2” and also change the variable for how many columns to the left or right we wish to capture i.e. rather than 4 as in OUTFILE 1 we may only want 3 in the future. PLEASE USE CLIENT 1 XML file to create the code and make sure it works. PLEASE USE CLIENT 2 as a secondary test to make sure the logic works based on the ISSUES (as per below)