• 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

Compare XML files using XSLT

 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know how to compare two XML files tag by tag using XSLT. What we need is to compare current day's file with yesterday's file and spit out differences in another XML file. Ideally all of these should be done in XSLT.
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Aleksey Matiychenko:
Does anyone know how to compare two XML files tag by tag using XSLT. What we need is to compare current day's file with yesterday's file and spit out differences in another XML file. Ideally all of these should be done in XSLT.


If the structure of the both the XML file is not going to change from time to time,then you can read the yesterday xml file
and store the necessary data in a variable,
then u can read the today's xml file,
store the new data in another variable.
Now you can compare them,upon need you can output them in to an XML file.
if you need some XSLT coding tips,reply back with specific requirements.
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check this link please http://www.dpawson.co.uk/xsl/sect2/N1777.html#d98e33
 
reply
    Bookmark Topic Watch Topic
  • New Topic