Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2018
    Posts
    2

    Default Ignore XML attribute order when comparing XML

    Hello all,

    First of all great work with BC4, I love it.
    I am having some difficulties comparing XML files.
    According to XML specs the order of the attributes is not significant.

    So these 2 statements when XML is concerned are equivalent:
    Code:
    <param7 mappings="1" min="0.6" max="0.8" value="0.200264"/>
    same as
    Code:
    <param7 min="0.6" max="0.8" mappings="1" value="0.200264"/>
    However BC4 will show them as different.

    QT for example will save XML every time with attributes in a random order.

    Is there a way to configure BC4 to get it to show those lines as the same?

    Thank you for any help

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    12,006

    Default

    Hello,

    The Text Compare considers the positioning as important, but can align character by character within a line. If components are out of order, this will detect as a difference, but we do have File Formats which can sort or tidy the XML files, including resorting the attributes, available for download here:
    http://www.scootersoftware.com/downl..._moreformatsv4
    Aaron P Scooter Software

  3. #3
    Join Date
    Feb 2018
    Posts
    2

    Default

    Thank you, that was exactly what I needed!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •