Announcement

Collapse
No announcement yet.

Doing a strict comparison of an attribute?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Doing a strict comparison of an attribute?

    I wasn't sure how to word this in the thread title.

    The problem I have right now is that in one of my XML files, there's about 400 records added. When the diff is done, it gets to a point where the diff is just wrong.

    I have elements with an id, so for example
    <element id="000001">
    </element>

    So when it sees some that are in one file, but not the other, it starts messing up entirely, comparing the trailing numbers. So it will highlight the 1 and compare it with record 000003.

    Can I make it ignore records that are in one file but not the other, and do a strict comparison on the ids, which I know will never be off by a few characters? (Basically compare only whole ids. Not parts of ids.)

  • #2
    Hello,

    The Text Compare works line by line looking for similar text. If you use the Session menu -> Session Settings, Alignment tab, and enable Never Align Differences, does this help push your matching only nodes to each other and fix your comparison?

    Or, if you try one of the alternate alignment algorithms, do they provide better results for your files?

    The longer workaround is to define grammar items to match on your ID's, make that the only Important text (everything else Unimportant) and use a combination of alignment algorithm settings and Never Align Differences option. This will then Never Align (Important) Differences, but will align unimportant differences, which can still count as differences with the Ignore Unimportant Differences toggle disabled.
    Aaron P Scooter Software

    Comment

    Working...
    X