I'm given a XML file as follows.
<?xml version="1.0" encoding="UTF-8"?>
<A value="?">
<B value="?">
<C value="10"/>
<C value ="20"/>
</B>
<B value="?">
<C value = "5" />
<C value = "10" />
</B>
</A>
How can I sum the value of the children node to set up the parent recursively?
<?xml version="1.0" encoding="UTF-8"?>
<A value="45">
<B value="30">
<C value="10"/>
<C value ="20"/>
</B>
<B value="15">
<C value = "5" />
<C value = "10" />
</B>
</A>