#1 You could script it to open the .XML file in MS Word then within MS Word select the Tools menu, click Compare and Merge Documents.
#2 You could also try...
Public Function CompareFiles (FilePath1, FilePath2) Dim FS, File1, File2 Set FS = CreateObject(â Scripting.FileSystemObjectâ ) If FS.GetFile(FilePath1).Size <> FS.GetFile(FilePath2).Size Then CompareFiles = True Exit Function End If Set File1 = FS.GetFile(FilePath1).OpenAsTextStream(1, 0) Set File2 = FS.GetFile(FilePath2).OpenAsTextStream(1, 0) CompareFiles = False Do While File1.AtEndOfStream = False Str1 = File1.Read(1000) Str2 = File2.Read(1000) CompareFiles = StrComp(Str1, Str2, 0) If CompareFiles <> 0 Then CompareFiles = True Exit Do End If Loop File1.Close() File2.Close() End Function
We used a third party tool called Beyond Compare for comparison of XML files. Within the QTP script, we gave the WShell commands necesary to open Beyond Compare with the two file names. We then retrieved the pass/fail on the comparison. If failed, we screen captured the Beyond Compare screen showing the difference(s).
That was at a previous company and I no longer have access to the actualy code written to perform these functions.