Ignore Specific XML tags

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johkar
    New User
    • Nov 2015
    • 1

    Ignore Specific XML tags

    Apparently I need step by step instructions for how to ignore specific XML tags and their contents when doing folder compares. I've searched the forums and watched the videos and everybody's examples seem to have different menu options than I am seeing. I can't find the Importance tab at all.

    Version: 3.3.13

    Requirement: If I name an XML tag I want that line to be ignored regardless of whether the files have a value or not. And even if the values are different. I'd like this implemented when all the files in the folder are evaluated.

    File Format: XML Tidied With Attributes Sorted

    File 1 File2
    <UnderwriterID /> <UnderwriterID>John Smith</UnderwriterID>
  • Aaron
    Team Scooter
    • Oct 2007
    • 16026

    #2
    Hello,

    To start with, you'll need to launch the Text Compare and then open your files. The Session Settings dialog is context specific for the current view. If you need to apply to a full folder, you can update the defaults or launch a parent Folder Compare and double click to launch a child Text Compare, which will have a dropdown to Also update parent session for the Folder Compare's Rules-based comparison.

    If you want to ignore UnderwriteID regardless of value, define a Basic grammar with Regular Expression enabled:
    <.* />

    and, assuming both tags are on the same line:
    <(.*)>.*</.*>

    A better method would likely be to use a Text Replacement (Pro feature), defined as
    <(.*)>.*</.*>
    with
    <$1 />
    Which will only ignore when these structures are aligned. You can trial Pro following these steps if needed:
    http://www.scootersoftware.com/suppo...?zz=kb_evalpro

    For reference for users finding this post, the Walkthrough and videos are found here:
    http://www.scootersoftware.com/suppo..._unimportantv3
    Aaron P Scooter Software

    Comment

    Working...