Arati Kadi

Arati Kadi

  • NA
  • 3
  • 0

Issue relating to XmlDiffPatch

May 31 2007 11:43 PM
Hello buddies,
 
This is Arati, am working as Software Developer in Siemens Information Systems Ltd. Bangalore, India.
I have been working on Microsoft .Net Technologies since 2 years.
 
Now... I have got one issue regarding Microsoft's XmlDiffPatch and I found no related articles.
I am using Microsoft's XmlDiffPatch component in my application(VS 2003 with Framework 1.1) to compare two XML files. I am getting an exception which is as follows (Exception.StackTrace):
 
 at Microsoft.XmlDiffPatch.XmlDiff.PreprocessNode(XmlDiffNode node, XmlDiffNode[]& postOrderArray, Int32& currentIndex)
 at Microsoft.XmlDiffPatch.XmlDiff.PreprocessNode(XmlDiffNode node, XmlDiffNode[]& postOrderArray, Int32& currentIndex)
 at Microsoft.XmlDiffPatch.XmlDiff.PreprocessTree(XmlDiffDocument doc, XmlDiffNode[]& postOrderArray)
 at Microsoft.XmlDiffPatch.XmlDiff.ZhangShashaAlgorithm()
 at Microsoft.XmlDiffPatch.XmlDiff.Diff(XmlWriter diffgramWriter)
 at Microsoft.XmlDiffPatch.XmlDiff.Compare(XmlNode sourceNode, XmlNode changedNode, XmlWriter diffgramWriter)
 
There is no much information available on the net regarding disadvantages and cuts of XmlDiffPatch.
 
Below is the code segment which I have written to compare two files.
XmlDocument xDiff = new XmlDocument();
StringBuilder sb = new StringBuilder();
StringWriter s = new StringWriter(sb);
XmlTextWriter xr = new XmlTextWriter(s);
//m_diffengine.Algorithm = XmlDiffAlgorithm.Precise;
bool cSuccess = m_diffengine.Compare(xOld, xNew, xr);
Console.WriteLine(cSuccess.ToString());
//xDiff.LoadXml(sb.ToString());
 
Could you please help me out in this case?
 
Thanks in advance.
 
 
 

Answers (2)