how to compare 2 xml files using xslt

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<span style=" Hello experts,<br/>
i am kinda new to xslt and stuff, i wanted to know how to compare two xml files using xslt<br/>
<br/>
this is my file1.xml<br/>
<xml><br/>
<employeedetails><br/>
<employee><br/>
<empname>kiran</empname><br/>
<empid>1231</empname><br/>
<emploc>chennai</emploc><br/>
</employee><br/>
<employee><br/>
<empname>kumar</empname><br/>
<empid>1232</empname><br/>
<emploc>chennai</emploc><br/>
</employee><br/>
</employeedetails><br/>
</xml><br/>
<br/>
this is my file2.xml<br/>
<xml><br/>
<employeedetails><br/>
<employee><br/>
<empid>1231</empid><br/>
<empid>1232</empid><br/>
<empid>1233</empid><br/>
</employee><br/>
</employeedetails><br/>
</xml><br/>
<br/>
can i use like this <br/>
<xsl:if test="document(file2.xml)/employeedetails/employee/empid=document(file1.xml)/employeedetails/employee/empid <br/>
is this the correct approach <br/>
i am new to this xslt stuff <br/>
any help is very much appreciated<br/>
thank you

View the full article
 
Back
Top