I am writing an MVC webapp in AspNetCore 2.0 and need to identify and locate changes in xml documents i produce so I can mark the changed elements and determine if a minor or major version increment is needed.
When searching for answers on how to do this I did not find many concrete answers.
I found a port of the old XmlDiffPatch tool but it requires framework and apparently don't work on core. The functionality of this class is a little sparse but very nice and fast and once I figured out how the diffgram was structured i could easily use it to identify the changed sections in my document.
However I was thinking (hoping) that the reason for not finding many posts about the subject maybe is that this is such a trivial task that no one cared to write about it.
What is currently the best api for performing this task?
(What are the odds that corefx team will introduce XmlDiffPatch to core 2.0?)
After hours of further research I came to the conclusion that the XmlDiffPatch had the functionality I liked most and I found that if I installed .Net framework 1.1, I could install the toolkit from MS Download and in this was included the original source code.
I put the .cs files into a new NetStandard2.0 classlib project and the code compiled without issues.
I pushed a package named XmlDiffPatch.Core to NuGet and also did the same for XmlDiffView (called XmlDiffView.Core) so others can use it. (The packages have been delisted on NuGet)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With