No announcement yet.

How to do XML comparsion with BC3

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to do XML comparsion with BC3

    We currently have some sample XML formats to compare.Does any one pls provide info on how to conduct a XML comparsion testing using BC3

  • #2

    Our XML Comparison currently uses the Text Compare session type:

    If your nodes are out of order or need whitespace reorganized, we have a few file formats available for download which might help:
    They are the XML Tidied formats in the Alternatives to Built-in section.

    I also strongly recommend this "Basics" tutorial video for an overview of the application and how to compare files:

    Let us know if you have any questions.
    Aaron P Scooter Software


    • #3
      Under Linux, can we use alignment configuration on <xml>values</xml> ?

      While I would love to use xpath to describe not only the match criteria but also to scope of the logical group of elements to synchronize with it, I would be happy if I could have these lines align:

      <foo>bar</foo> <foo>bar</foo>
      <foo>wdigthooh</foo> <foo>wdigthooh</foo>

      The Importance rules allow Regex, but does it allow matching groups in that RegEx? In other words: does
      align the lines match if the (.+) on the left matches the (.+) on the right?

      What if I had several groups, not necessarily in the same sequence

      (.*)\; (.*)

      would match either $1 : $2 or $2 : $1?


      • #4

        If any of the 4 provided XML sort formats do not currently sort your files, you can install and edit the "XML Sorted and Tidied" format, which has additional helper files including an .xslt file. If you are familiar with .xslt you can edit this file to have it sort your files in different ways. Improving our xml handling is on our wishlist, but we do not have any additional sorting methods other than those 4 formats at this time. If you edit your xslt and would like to submit it to us that would be great; we could then review it and possibly add it as a 5th format.

        Defining Grammar Elements does not have a great impact on the alignment. It is a factor, but the purpose of defining elements is to provide syntax coloring or control importance. If you wanted to make a definition that matches on <node> and </node>, then mark nodes as unimportant, and then mark in the Session Settings, Alignment tab, Never Align Differences, this would not include nodes, since this option only effects Important differences.
        Aaron P Scooter Software