Sort XML Datasources
2 min
xpath selects normally return nodes in the order they appear in the xml file however, you can set a sort criteria and the returned nodes will be sorted by that criteria sort follows the xquery syntax using "order by node, node" the sort can be in ascending (default) or descending order for autotag and the net engine the sort will always be in ascending order for the java engine the word descending will be ignored you can have secondary sort criteria such as "lastname, firstname" the sort criteria can be any valid xpath that can be applied to each node in the returned list of nodes you can type the sort criteria in by hand or use the wizard and add sort criteria by clicking click here to add an order by xpath selects normally return nodes in the order they appear in the xml file however, you can set a sort criteria and the returned nodes will be sorted by that criteria to sort on an xpath query, bring up the tag builder and enter the criteria in the sort property the button to the right provides a pop up window displaying the nodes under the select of your foreach tag the sort will always be in ascending order, so 1, 5, 23 or frank, jose, zeb you can have secondary sort criteria such as "lastname;firstname" the pop up selector does not support secondary nodes, but you can type them in by hand the sort criteria can be any valid xpath that can be applied to each node in the returned list of nodes the pop up node selector does not provide a full wizard, but you can type complex selects in by hand