Compare XML files
XML / XSL
3
Posts
3
Posters
15
Views
1
Watching
-
compare their structure or node values? If the structure are the same, and you are using .NET - you can use something called XmlTextReader (or XmlNodeReader) call MoveNext(...) [or something like that] on both XML files and count differences. would look like something like this...
while (...)
{
xml1.MoveNext(...);
xml2.MoveNext(...);
string x1 = xml1.value;
string x2 = xml2.value;
if (x1 != x2)
nDiffrenceCounter++;
}Mike M WinInsider.com
-
in order to know if they are different (without counting) you can compare the xml-strings: in VB: dim domFile1 as new DomDocument dim domFile2 as new DomDocument domFile1.load "C:\file1.xml" domFile2.load "C:\file2.xml" If domFile1.xml = domFile2.xml Then .... what do you need? Sebastian