Restore the number of elements of a variable of array type.
 

1 array.size

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

Number of the elements of an array.

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

        <println><array.size name='cities' /></println>
    </body>
</xsql-script>

An alternative to obtain the number of cities which contains the variable, less elegant but equally valid, would be:

Copy
<array.size><cities/></array.size>

The result is:

Copy
3