"XML Sorted" and "XML sorted and tidied"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vindhya
    Visitor
    • Jul 2012
    • 3

    "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?
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    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

    Comment

    • Vindhya
      Visitor
      • Jul 2012
      • 3

      #3
      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.

      Comment

      Working...