Returns a copy of the array object.
 

1 array.clone

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

Clone the array.

Copy
<xsql-script name='array_clone'>
    <body>

        <array name='cities'>
            <string>Barcelona</string>
            <string>Paris</string>
            <null />
            <string>Roma</string>
            <null />
        </array>

        <set name='cities_clone'>
            <array.clone name='cities' />
        </set>

        <!-- element at position 3: Roma -->
        <println>element at position 3: <array.get name='cities_clone'><number>3</number></array.get></println>

        <!-- Delete the nulls of the clone objects, the original object remains as it is. -->
        <array.clearNulls name='cities_clone' />

        <!-- size      : 5 -->
        <println>size      : <array.size name='cities' /></println>
        <!-- size clone: 3 -->
        <println>size clone: <array.size name='cities_clone' /></println>

    </body>
</xsql-script>

The result is:

Copy
element at position 3: Roma
size      : 5
size clone: 3