I am new to python and I want to modify an xml file that I have. Following some guidance I was able to parse the xml file using Element tree as follow:
import xml.etree.ElementTree as ET
tree = ET.parse('Document.xml')
root = tree.getroot()
Next step I want to modify in it like for example delete first 2 lines and delete all tags of "sprit:", then get the new xml file with the fixes
Here is a sample:
<!-- STATUS : PASSED / OK / Spec2spirit WARNING / 4/4 (100%) /Test OK -->
<spirit:vendor>company</spirit:vendor>
<spirit:library>lib</spirit:library>
<spirit:name>name</spirit:name>
<spirit:version>1.0</spirit:version>
and here is the result I want:
<library>lib</library>
<name>name</name>
<version>1.0</version>
Thank you in advance!