< assign >

The <assign> element assigns a value to a variable. It is illegal to make an assignment to a variable that has not been explicitly declared using a <var> element or a <var> statement within a <script>. Attempting to assign an undeclared variable causes an error.semantic event to be thrown.

nameThe name of the variable being assigned to. This is required.
exprThe value to assign to the variable. This is required.

In the expr content you can escape special characters (with “\”) : “Bonjour, je suis l\'assistant téléphonique… '”.

<block>, <catch>, <error>, <filled>, <help>, <if>, <noinput>, <nomatch>
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 <var name="tree" expr="'an apple tree'"/>
   <prompt> The initial value is <value expr="tree"/> </prompt>
   <assign name="tree" expr="'apple orchards'"/>
   <prompt> The new value is <value expr="tree"/> </prompt>