Duplicate node names output to XML

I have a requirement for part of my output XML to look like the attached from those 4 columns. The issue is the transform does not like the fact the path to these repeated node names is the same so it only outputs the last values for Name and Value. If I rename the second lot of Value and Name labels then it works fine and I get both sections.

Likely the requirement is bad practice in the XML but cannot change Microsoft’s input. Any way to work around this?


Output as XML:


Does that answer your question?

Unfortunately this is only a part of a more complex xml so is embedded a couple of layers beyond the root. Screenshot attached shows the more complete first half of the xml. So I do not believe I can use the root and row names here - unless I have to do them as different XML files and then merge them somehow?

You could do that in 2 stages. Output the XML in the first .transform. In the second .transform read it in as plain text (not XML) and stack it. A little bit kludgy, but hopefully will give you what you want.