Quantcast
Channel: How can I merge XML files? - Stack Overflow
Viewing all articles
Browse latest Browse all 8

How can I merge XML files?

$
0
0

I have two xml files that both have the same schema and I would like to merge into a single xml file. Is there an easy way to do this?

For example,

<Root><LeafA><Item1 /><Item2 /></LeafA><LeafB><Item1 /><Item2 /></LeafB></Root>

+

<Root><LeafA><Item3 /><Item4 /></LeafA><LeafB><Item3 /><Item4 /></LeafB></Root>

= new file containing

<Root><LeafA><Item1 /><Item2 /><Item3 /><Item4 /></LeafA><LeafB><Item1 /><Item2 /><Item3 /><Item4 /></LeafB></Root>

Viewing all articles
Browse latest Browse all 8

Trending Articles