Text (XML) comparison is marked as unimportant

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • steveculshaw
    Expert
    • Sep 2009
    • 73

    Text (XML) comparison is marked as unimportant

    I'm doing a diff between two XML files.

    The lines like ...
    Code:
    <BuyersItemNumber>B    427F</BuyersItemNumber>
    and
    Code:
    <BuyersItemNumber>     B    427F</BuyersItemNumber>
    are being flagged as unimportant differences

    Is there anyway to have them flagged as important ... because they are :-)
  • hartungr
    Enthusiast
    • Apr 2005
    • 47

    #2
    I ran into a similar problem in the past, and solved it by creating a grammar element that matched on my line, and then moved that new grammar element to the top of the list.

    Using your example, I would create a basic element named 'buyers item', containing the regular expression
    Code:
    <BuyersItemNumber>.*</BuyersItemNumber>
    This would show the whitespace differences as important.

    Comment

    • Aaron
      Team Scooter
      • Oct 2007
      • 16000

      #3
      Thanks. This is a great solution.

      If whitespace could/should be important in other instances, you can also enable the 'Embedded Whitespace' importance option in the Session Settings, Importance tab.
      Aaron P Scooter Software

      Comment

      • steveculshaw
        Expert
        • Sep 2009
        • 73

        #4
        Thank you

        Comment

        Working...