Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2012
    Posts
    3

    Default "XML Sorted" and "XML sorted and tidied"

    I need to sort the nodes in XML files before comparing. So I added XML Sorted. But it didn't sort nodes in simple xml files. For example
    <root>
    <b>b</b>
    <a>a</a>
    </root>

    should be

    <root>
    <a>a</a>
    <b>b</b>
    </root>

    Then I tried using XML sorted and tidied also. It also didn't sort the elements but other things like indentation was applied.

    http://www.scootersoftware.com/downl...oreformats_alt says that "XML Sorted" and "XML sorted and tidied" sort nodes Alphanumerically. But why it doesn't work for this type of XML files?

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,901

    Default

    Sorry for the delay. I have been comparing our current xslt results with koen's example (from here: http://www.scootersoftware.com/vbull...ead.php?t=8130) to see if we can have a single, multipurpose xslt that works for a broad range of files. I am not familiar enough with the xslt format to make something like this quickly; our previous xslt conversions have been provided by helpful customers. In the meantime, if you are familiar with xslt, you can alter/edit the one the conversion process uses in the Beyond Compare 3\Helpers\HtmlTidy\ directory: XML_sorted.xslt

    Please post any helpful examples or information regarding an xslt that works for your example, and we'll definitely try to incorporate it.
    Aaron P Scooter Software

  3. #3
    Join Date
    Jul 2012
    Posts
    3

    Default

    Thanks for your reply. For the moment I'm also not familiar with xslt. But I'll try to edit XML_sorted.xslt to work with any xml file.

Posting Permissions

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