Remove an elemento of the map.
1 map.remove
<map.remove name='name'>
<expr /> ?
<var /> ?
</map.remove>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | string | Name of the map. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Eexpr | Integer | ||||
Evar | Integer |
Example
Copy
<xsql-script name='map_remove_sample1'> <body> <map name='a'> <item>0<string>ZERO</string></item> <item>1<string>ONE</string></item> <item>2<string>TWO</string></item> <item>3<string>THREE</string></item> <item>4<string>FOUR</string></item> <item>5<string>FIVE</string></item> <item>6<string>SIX</string></item> <item>7<string>SEVEN</string></item> <item>8<string>EIGHT</string></item> <item>9<string>NINE</string></item> <item>10<string>TEN</string></item> </map> <map.remove name='a'>10</map.remove> <println><a/></println> </body> </xsql-script>
The element of the table which has as key the integer 10 is removed:
Copy
<map.remove name='a'>10</map.remove>
The structure of 11 elements become to 10.