I have a problem trying to compare 2 xml files with the XmlDiff library from Microsoft.
I am using an overloaded function which passes 2 xmls as strings :
xmldiff = new XmlDiff(XmlDiffOptions.IgnoreChildOrder | XmlDiffOptions.IgnorePrefixes | XmlDiffOptions.IgnoreNamespaces);
bool identical = xmldiff.Compare(first, last, false);
where first and last look more or less like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<breakfast_menu>
<food>
<name>Belgian Waffles</name>
<price>$5.95</price>
<description>two of our famous Belgian Waffles with plenty of real maple syrup</description>
<calories>650</calories>
</food>
<food>
<name>Strawberry Belgian Waffles</name>
<price>$7.95</price>
<description>light Belgian waffles covered with strawberries and whipped cream</description>
<calories>900</calories>
</food>
</breakfast_menu>
And I get this error

EDIT:
OK, I think that was my issue – I passed whole content of the file instead of just its path or URL(as in the documentation). So now I have another problem – how can I use this overload – public Boolean Compare(XmlReader, XmlReader) or this public Boolean Compare(XmlNode, XmlNode) when I have the file contents in a string ?
It looks like you want to pass the file path to
Compare, not the xml string.