Why do I get "Illegal characters in path" while using XmlDiff to compare 2 xml files?
Posted
by
Patryk
on Stack Overflow
See other posts from Stack Overflow
or by Patryk
Published on 2011-11-27T01:38:01Z
Indexed on
2011/11/27
1:50 UTC
Read the original article
Hit count: 435
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
© Stack Overflow or respective owner