copy xml elements with matching names from another doc with slightly different structure
My requirement is to pre-populate an xml document A by copying matching xml elements from an existing document B.
I cannot introduce any new elements into A; I just want to bring in elements from B if there is already an element in A of the same name.
B's structure will be slightly different from A's. Both will be exactly three elements deep, with the same root, and one child whose name will vary. It's the common elements under that child that I want to copy. (There is an oddball document that doesn't match this three-layer pattern but I'm ignoring that for now.)
I have a pretty good idea that xsl:copy is the tool, but... no idea how to do this. An xsl 1.0 solution would be best, we're on a pretty old platform and I'm not sure 2.0 is supported. Can anyone assist?
Gertone (Geert Bormans)
8/22/2022 - Mon
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst