Compare 2 XML using XSLT

F

francesco_java

Hi all,

i need to compare two xml files using an XSLT. Let's suppose i've two
xml files like this:

XML 1:
<DirFile id="d001">
<File id="001" name="one">
<dim>20000</dim>
....
</File>
<DirFile id="d002">
<File id="003" name="one">
<dim>20000</dim>
....
</File>
</DirFile>
</DirFile>

XML 2:

<DirFile id="d001">
<File id="001" name="one">
<dim>20000</dim>
....
</File>
<File id="002" name="one">
<dim>20000</dim>
....
</File>
<DirFile id="d002">
<File id="001" name="one">
<dim>20000</dim>
....
</File>
</DirFile>
</DirFile>

I'd like to obtain something like that:

<DirFile id="d001">
<File id="001" name="one">
<dim>20000</dim>
....
</File>
<File id="002" name="one"/>
<DirFile id="d002">
<File id="001" name="one"/>
<File id="003" name="one">
<dim>20000</dim>
....
</File>
</DirFile>
</DirFile>

Pls Help!!!
Thx
Fr.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top