Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to compare 2 xml response files? (Other than Diff control)

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
hi,
i run a request r1 against one webservice (endpoint) say e1 and get response as res1. then same request r1 will sent to different endpoint e2 and get response as res2.
now i want to compare the res1 and res2 xml files. i dont want to use Diff control as it compares the files line by line. i want the files to be compared on node bases, as the elements order in res1 and res2 differs.
so let me know how this can be done.


thanks,
vijayalaxmi
Tagged:

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    edited December 2016
    Hello,

    There is an option in the Diff tool to ignore element order. That should allow you to compare your two response properly.

    If all the elements are the same(names included) and just in a different order, then the Diff, with the ignore order option, should work.

    If not, then you can use an XML Transformer to extract the elements in the same order, then the output of the 2 XML Transformers can be compared with a Diff.

    ~Joe