There is a loadXML method that you can use to load your XML in the data dom. There are 2 parameters that you can pass that tell the function whether you want to overwrite any existing nodes and whether you want to load children or not. I do not have the docs in front of me so I do not know which is which, but if you want to load your xml at the same level as the data node then you can use this command:
xfa.datasets.loadXML(string_output.rawValue, false, false)
Where string_output.rawValue is the field that holds the XML that you want to merge.
I will post the info on those 2 params when I return to the office.