Determine if two arrays are equals.

1 array.equals

<array.equals name='name'>
    <array 1 /> +
    <array 2 /> +
</array.equals>
Example

Determine if the two arrays are equal.

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

    <set name='cities'>
	<array>
	    <string>Avila</string>
	    <string>Barcelona</string>
	    <string>Cádiz</string>
	</array>
    </set>

    <set name='cities_repeated'>
        <array>
            <string>Avila</string>
            <string>Barcelona</string>
            <string>Cádiz</string>
        </array>
    </set>

    <println>
        <array.equals name= 'a'>
	    <cities/>
	    <cities_repeated/>
        </array.equals>
    </println>

    </body>
</xsql-script>

Shows the following result:

Copy
true
Example

Determine of two different arrays are equals.

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

   <set name='cities'>
       <array>
           <string>Avila</string>
           <string>Barcelona</string>
           <string>Cádiz</string>
       </array>
   </set>

   <set name='countries'>
       <array>
           <string>España</string>
           <string>Francia</string>
           <string>Portugal</string>
       </array>
   </set>

   <println>
       <array.equals name= 'a'>
           <cities/>
           <countries/>
       </array.equals>
   </println>

   </body>

</xsql-script>

Shows the following result:

Copy
false