Announcement

Collapse
No announcement yet.

XML Self-Closing Tags

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

  • XML Self-Closing Tags

    I'm comparing two XML files. One has
    Code:
    <Description/>
    and the other has
    Code:
    <Description></Description>
    . In XML, the two are semantically identical. Is there a way to make BC4 treat this as a minor/unimportant difference?

  • #2
    Hello,

    If you go to our website and download our Tidied or Sorted variants, this can convert your files, and normalize node names like this so they are both the same. Any edits would then save in this new visible structure, so please be aware before performing a Save.

    You can also use the Pro feature Text Replacements in the Session menu -> Replacements tab to define a rule to ignore this specific change with, Find:
    <(.*)/>
    Replace with:
    <$1></$1>
    and Enable Regular Expression
    Aaron P Scooter Software

    Comment


    • #3
      Thanks, your Text Replacements rule does what I want. Is there a way to make that the default when comparing XML files?

      Comment


      • #4
        Not for a specific file extension, no. You can save it as a setting for all files within a particular Folder Compare session, or update the global session defaults for all text comparisons.

        To control which, launch a Folder Compare, then from within the folder compare double click a pair of files and launch a child Text Comparison. In the Session Settings dialog you would create the Text Replacements, but before clicking Ok on the main Session Setting dialog, update "Only use for this view" to "Use for all files in parent session" or "Also update session defaults". Then re-save the parent Folder Compare, if configuring for that specific folder comparison.
        Aaron P Scooter Software

        Comment

        Working...
        X