I have an InfoPath 2010 form that is published as a content type.
I have a SharePoint library that has this content type enabled. The SharePoint library also have major versioning enabled.
Let’s say that I have saved an instance of the form in the library and edited it multiple times so that multiple versions are created.
I need to compare 2 versions against each other to see the exact changes. Is this supported by SharePoint or should I used code for that (I am examining SPDiffUtility now)?
No, SharePoint does not let you compare versions and their differences OOTB.
As far as I can tell
SPDiffUtilitysimply tells you the difference between two strings, but does not support versions just like that. Comparing version is still very easy:Basically you have to look into the
SPFile.Versionscollection and compare the versions you have.The problem is that InfoPath stores its document as XML, so you will have to parse the XML you receive to extract all fields and see their differences – a good start for parsing the XML is to create a class file for easier access in code via
xsd.exelike for example explained here.