I have an XML with the following schema:
<?xml version="1.0"?>
<TagA attr1="abs" attrB="mdf">
<TagB>
<TagC attr3="g12dg" attr4="fgf">
<TagD attr5="dgs" attr6="furu" />
</TagC>
<TagC attr3="fh5yg" attr4="ergf">
<TagD attr5="dgs" attr6="tdru" />
<TagD attr5="oko" attr6="tsas" />
</TagC>
</TagB>
</TagA>
The attr3 is unique for each node TagC.
What I need to do is for each node TagC, perform some operation OP1 on the command line and then come back and insert an attribute attr7 (whose value = output from OP1) to the same node TagC.
I'm trying to achieve this using Python on Ubuntu.