• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XML Diff

 
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to compare 2 XMLs and get difference out with the help of XSLT?

For instnace
XML1
<Employees>
<Employee>
<Id>101</Id>
<Name>John</Name>
<Employee>
<Employee>
<Id>102</Id>
<Name>Rambo</Name>
<Employee>
<Employees>


XML2
<Employees>
<Employee>
<Id>101</Id>
<Name>John</Name>
<Employee>
<Employee>
<Id>103</Id>
<Name>Brett</Name>
<Employee>
<Employees>

XMLDiff
<Employees>
<Employee>
<Id>101</Id>
<Name>John</Name>
<Employee>
<Employee>
<Id>102</Id>
<Name>Rambo</Name>
<Employee>
<Employee>
<Id>103</Id>
<Name>Brett</Name>
<Employee>
<Employees>

Any suggestions?

Thanks,


 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wouldn't call the third document the "difference" of the first two. I'm not exactly sure how you would display the difference, but that isn't it. It's more like the union of the two documents. So you might want to clarify your requirements before looking for implementations of those requirements.
 
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic