I am searching for a way to remove a specific tag <e>
that has value as mmm
within xml
file (i.e <e>mmm</e>
. I am referring to this thread as staring guide: How to remove elements from XML using Python without using lxml
library instead of using ElementTree
with python v2.6.6
. I was trying to connect a dot with the thread and reading upon ElementTree api
doc but I haven't been successful.
I appreciate your advice and thought on this.
<?xml version='1.0' encoding='UTF-8'?>
<parent>
<first>
<a>123</a>
<c>987</c>
<d>
<e>mmm</e>
<e>yyy</e>
</d>
</first>
<second>
<a>456</a>
<c>345</c>
<d>
<e>mmm</e>
<e>hhh</e>
</d>
</second>
</parent>