0

I have XMLs(or Objects) that represents data at some point in a business process. I would like to be able to see what has changed between step1 and step5(two versions of the same XML or Object). Id like to implement this like diff function in version control system. how to do it in web app?

P.S. I dont want to just store those files in VCS and than make it do the diff. However if I could somehow emulate VCS without having one that would be cool.

P.S. I know there are some JS frameworks that offer diff functionality, but the XML could have 10MB, so I think it should be dont at server side.

IAdapter
  • 62,595
  • 73
  • 179
  • 242
  • Even though your business process is serialized as XML, I'm wondering if it's a classical graph-based representation of business process (nodes as steps, and vertices as transitions - like BPMN have). In that case you should consider comparing two objects - graph_1 and graph_2 - and identifying new/removed/intact nodes and vertices. – Art Licis Dec 29 '10 at 09:44
  • its not duplicate, there guy talks about two strings, I here have 10MB strings. – IAdapter Dec 29 '10 at 09:50
  • @Arturs Licis but if I have two object graphs I would still have to write complex diff algoritm. Id do that if I cant some existing solution. – IAdapter Dec 29 '10 at 09:55

1 Answers1

1

There seem to be quite a few Open Source XML Diff projects written in Java. I'd recommend taking a look at them and see if you can't work them into your project somehow to spit out a preformatted HTML result.

http://www.manageability.org/blog/stuff/open-source-xml-diff-in-java

Spencer Ruport
  • 34,865
  • 12
  • 85
  • 147