i pretty new comparing xmls in c#. can suggest me easy , performant way same. below requirement.
source xml file:
<a> <b>hello</b> <c> <d> <e>abcd</e> </d> </c> <f>image1</f> </a>
destination xml file:
<a> <b1>hello</b1> <c> <d> <e>thguh</e> </d> </c> <f>image2</f> </a>
in xml files tag, don't want see difference intended. hence want filter out such differences , see if there other differences node values , node names. comparing node values , filtering image value changes , telling differences priority.
you can use xmldiff compare xml files xml differance , compare
xmldiff xmldiff = new xmldiff(xmldiffoptions.ignorechildorder | xmldiffoptions.ignorenamespaces | xmldiffoptions.ignoreprefixes);
then compare
bool bidentical = xmldiff.compare(originalfile, newfile, false, diffgramwriter); diffgramwriter.close();