Order the elements of a variable of array type.
 

1 array.sort

<array.sort name='name'>
    <array /> ?
</array.sort>
Example

Order an array.

Copy
<xsql-script name='array_sort_test1'>
    <body>
        <array name='cities'>
            <string>Paris</string>
            <string>Rome</string>
            <string>Barcelona</string>
        </array>

        <array.sort name='cities' />

        <println><cities/></println>
    </body>
</xsql-script>

An alternative to obtain the ordered cities (alphabetically) which contain the variable, but egally valid, would be:

Copy
<array.sort><cities/></array.sort>

The result is:

Copy
Barcelona
Paris
Rome