I have an xml file and I want to uncomment and comment out an element in the file.
<my_element>
<blablabla href="docs/MyBlank.htm" />
</my_element>
This one I would like to "close" (comment out) like this:
<!--
<my_element>
<blablabla href="docs/MyBlank.htm" />
</my_element>
-->
Furter down in the file I have an element with the same name which is "closed" (commented out) like this:
<!--
<my_element>
<blablabla href="secretwebhacking/MySecrectBankLogin.htm" />
</my_element>
-->
and I want to "open" it up (uncomment) like:
<my_element>
<blablabla href="secretwebhacking/MySecrectBankLogin.htm" />
</my_element>
I use ElementTree for this, I know how to edit the value and the attribute in the element, but I am not at all sure how to remove and add the <!-- --> around one specific element.