I am using asp.net and the .net framework 2.0. I may be able to upgrade the servers to 3.5 if the solution is compelling enough. Here is the problem.
I have two pieces of xml. I'll refer to piece number 1 as the template and piece number 2 as the actual.
Here's a basic example:
template:
<questions>
<question1 msg="1234">
<answer></answer>
</question1>
<question2 msg="1235">
<answer></answer>
</question2>
<question3 msg="">
<answer></answer>
</question3>
</questions>
actual:
<questions>
<question1 msg="1234">
<answer>foo</answer>
</question1>
<question2 msg="1235">
<answer>bar</answer>
</question2>
<question3 msg="dynamic">
<answer>blob</answer>
</question3>
</questions>
The template is generic and common to many users, then there is the actual which is specific to individual users.
I would like to extract the delta between the actual and the template in such a way that it can be saved independently and then subsequently re-applied to the template to arrive at a complete representation of the actual xml.
I've done some looking and found an "XML Diff and Patch" tool for the .net 1.0 that looks like it does pretty much exactly what I need but then I found some other references to it that seem to indicate it has dropped off the radar. http://msdn.microsoft.com/en-us/library/aa302294.aspx
I've also found a number of examples which rely on the specific xml structure to manually extract the differences between the entities represented by the xml. I am generally uncomfortable with this solution and would really prefer a more generic one that is resilient to changes made to the xml.
Ideally, I'd love to find the xmldiff/patch functionality built into .net2.0/3.5 somewhere. If not, then something which solves the above problem in a generic enough way that it doesn't break when the xml changes.
Thanks