extract data from xml and save as CSV

Job ID: 30809970

Budget: $10 – $30 USD

I have a few thousand xml files (see attachment doc2.xml) and need to extract data and save as csv. The output dataframe should look as in the attached csv file.

The xml contains paragraphs of text containing some errors. The correction is in 'NS' element where the incorrect word or character is between <i> tag and correct version is between <c> tags. Example:
<p>Thanks for <NS type="DD"><i>you</i><c>your</c></NS> letter.<p>

I will need the output of 1400 samples in the CSV file as well as the code.
Related categories: XML Python Data Processing Data Extraction