开发者

How to compare two xml schemas

开发者 https://www.devze.com 2023-01-04 07:19 出处:网络
We generate xml schema for our web services. Amongst other details these schema contain the defintion of the complex types consumers of our services pass in.

We generate xml schema for our web services.

Amongst other details these schema contain the defintion of the complex types consumers of our services pass in.

Those complex types can change if our third party suppliers decide they want to add more details but as can be imagined that's something that shouldn't happen on the whim of a developer.

So we'd like开发者_如何转开发 to compare schemas to ensure that we're deploying what we think we ought to be and if there are changes, what they are.

There's always XMLDiffPatch.exe I guess but I wondered if anywhere in the .net framework there was some schema specific functionality that would make comparing schema more strightforward.


Not schema specific, but would a checksum work? Pretty easy in c#:

FileStream file = new FileStream(fileName, FileMode.Open);
MD5 md5 = new MD5CryptoServiceProvider();
byte[] retVal = md5.ComputeHash(file);
file.Close();


Maybe Xnode deepequals can be used?

It kind of depends how much can be changed without you are seeing it as a change.

Is it okay to change xml-comments?

0

精彩评论

暂无评论...
验证码 换一张
取 消