I think I solved at least part of it but still would welcome additional ways in which to undertake this task.
The biggest part of the puzzle was to ensure that the meta data and model components from the original 12d XML were used to write the updated data. Not sure if both are needed but it ensured the data from the input, after manipulation, was written successfully.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.