Hi,
If I have understood your question correctly, you should be able to add a node by referencing it by name (even though it doesn't exist yet) and setting it to a value for example:
/process_data/testXML =
<test>
<field1>a</field1>
<field2>b</field2>
<field3>c</field3>
</test>
If we add "SetValue" activity to our process with the following settings:
Location /process_data/testXML/test/field4 Expression "new value"
testXML would then equal:
<test>
<field1>a</field1>
<field2>b</field2>
<field3>c</field3>
<field4>new value</field4>
</test>