I have a process with an XML variable, i.e.
var myXML = <package>
<assets>
<foo name="A">....</foo>
<foo name="B">....</foo>
<foo name="C">....</foo>
</assets>
</package>
and I need to add an additional subtree <foo name="D">...</foo> to this variable under /package/assets/.
I am trying to use SetValue but cannot get it to work.
What's the best way to do this?