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)
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.
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Arati KadiPosted Jun 1, 2007, 3:21 AM
Thank you for your reply.
Actually I am comparing two docbook files. (DocBook is a markup language for technical documentation. The structure of which is in XML format. If you need more info on this, you can get it on http://www.docbook.org )
Here are the files. The real big ones to paste here...
File1.docbook
RBG
File2.docbook
RBG
Jan MontanoPosted Jun 1, 2007, 12:07 AM
I haven't used XmlDiffPatch yet. But could we take a loot at the xml files you're using for comparison?