If you merge XML onto the template that is not used in bindings to individual fields it will be put into the Data Dom and will be included in a submission (unless there is a schema involved). Once it is in the DOM you can access it using xfa.datasets.data and navigate to the appropriate node. Note that once you get ot the appropriate node use the value method to get the actual node value.
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: