Question

XML Document Comparison

Hi,

I want to comapre two xml document.

Need sample automation flow.Please suggest.

Thanks.

Correct Answer
November 27, 2019 - 2:10pm

Here's a quick example you might use to give you some ideas. For this though, it will be much more efficient to do in C# or with a third-party library.

Comments

Keep up to date on this post and subscribe to comments

Pega
November 27, 2019 - 11:32am

Using Pega Robotics to compare two XML files is possible, but you're really just writing C# code to do it, and thus not really using anything specific to Pega Robotics. I would use a C# script where you pass it the path to each of the files. What type of comparison and output do you want? If you just want to know if they are different, then you could use a combination of the FileUtils and a StringUtils components to answer that. FileUtils to read the file to text and a StringUtils to compare the two.

Pega
November 27, 2019 - 2:10pm

Here's a quick example you might use to give you some ideas. For this though, it will be much more efficient to do in C# or with a third-party library.