Merge 2 XML files with xslt
Posted
by MADAL
on Stack Overflow
See other posts from Stack Overflow
or by MADAL
Published on 2010-05-04T13:53:31Z
Indexed on
2010/05/04
13:58 UTC
Read the original article
Hit count: 620
xslt
Hello,
I try to merge 2 XML-Files. I use XSLT: [http://www2.informatik.hu-berlin.de/...erge.xslt.html] I need to change this XSLT-File in order to have another result. My first file, which needs to be merged:
<A1>
<A2>
<A3>
<b>a</b>
<c>b</c>
</A3>
</A2>
</A1>
<A1>
<A2>
<A3>
<b>1</b>
<c>2</c>
</A3>
</A2>
</A1>
...
My 2. file, which needs to be merged whithe the first one:
<A1>
<A2>
<A3>
<b>x</b>
<c>y</c>
</A3>
</A2>
</A1>
<A1>
<A2>
<A3>
<b>8</b>
<c>9</c>
</A3>
</A2>
</A1>
The result should be:
<A1>
<A2>
<A3>
<b>a</b><bx><b>a</b></bx><bx><b>x</b></bx>
<c>by</c>
</A3>
</A2>
</A1>
<A1>
<A2>
<A3>
<b>1</b><bx><b>1</b></bx><bx><b>18</b></bx>
<c>29</c>
</A3>
</A2>
</A1>
Could anybody help me with that?!!!! Regards
© Stack Overflow or respective owner