Xml Comparison in C#

前端 未结 5 2057
离开以前
离开以前 2020-11-30 05:30

I\'m trying to compare two Xml files using C# code. I want to ignore Xml syntax differences (i.e. prefix names). For that I am using Microsoft\'s XML Diff and Patch C# API.

5条回答
  •  旧时难觅i
    2020-11-30 05:46

    It might be an idea to load XmlDocument instances from each xml file, and compare the XML DOM instead? Providing the correct validation is done on each, that should give you a common ground for a comparison, and should allow standard difference reporting. Possibly even the ability to update one from the other with the delta.

提交回复
热议问题