I have a table with an XML column. How can I add another node inside a node that contains a child node with a specific value? For example I'd like to copy foo/bar/e/f
node from barId 6699 to barId 66989. I only find examples where you select node based on an attribute value. I need to filter by child node value instead.
<foo>
<bar>
<barId>66988</barId>
<name>baz 3</name>
</bar>
<bar>
<barId>66989</barId>
<name>b </name>
<e>
<g>
<h>
<l>-</l>
<m>k</m>
</h>
<h>
<l>p v</l>
<m>k</m>
</h>
</g>
</e>
</bar>
<bar>
<barId>6699</barId>
<name>n 4 c</name>
<e>
<f>
<h>
<i>k</i>
<j>9.3</j>
</h>
</f>
</e>
</bar>
</foo>