Comparing elements in xml files but not values or attributes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • evest
    New User
    • Jun 2009
    • 1

    Comparing elements in xml files but not values or attributes

    Hi,
    in BC2 I was able to create a file comparison rule that enabled me to compare two xml files, where only element names where compared, not the values.

    I have xml files with language resources inside, and have one file per language. The element values will of course differ between languages, but the element names should be identical.

    See http://labs.episerver.com/en/Blogs/S...files-in-sync/ for more information on how I did this.

    Comparing xml files this way was easy to do in BC2, but in BC3 I'm having difficulties getting the same result. At least in the same easy way as in BC2. I think I have managed to define the grammar I need, but to get the result I need to change the rules each time I open two of these xml files. If I diff regular xml files, I need to change the rules again.

    In BC2 this was just one entity, a custom "File Comparison Rule", now I have to work with a custom file format (really just a tweaked copy of the xml file format), and then I need to adjust the rules each time (as I don't want to overwrite the global session settings as this also affects the regular xml file format too.)

    It just feels like I'm missing something here, as this was so easy to do in BC2.

    Best Regards,
    Steve Celius
  • Aaron
    Team Scooter
    • Oct 2007
    • 15997

    #2
    In BC2, the rules were always global.

    In BC3, the grammar definition is global, but whether it is important or not is session based. This way, Comments are defined once, but are Important sometimes, and Unimportant other times.

    You can update your Session Setting defaults from the Home screen: Edit session defaults folder, or from the lower left dropdown in the Session Settings of a specific Session ("Also update session defaults").

    Here's a KB article discussing the basic walkthrough of defining grammar and setting is as Unimportant (or Important):
    http://www.scootersoftware.com/suppo...mportantv3.php
    Aaron P Scooter Software

    Comment

    Working...