Last reviewed: 3/23/2024 12:44:15 PM

<vxml>

A <vxml> element is the top-level element in each VoiceXML document.

Syntax

<vxml application="uri"
      version="float"
      xmlns="uri"
      xml:base="uri"
      xml:lang="langid" />

Attributes

application

The URI of this document's application root document, if any.

version

The version of VoiceXML of this document (required). The current version number is 2.0.

xmlns

The designated namespace for VoiceXML (required). The namespace for VoiceXML is defined to be http://www.w3.org/2001/vxml.

xml:base

The base URI for this document from which all relative references within the document take as their base.

xml:lang

The language identifier for this document. If omitted, the value is a platform-specific default.

Children

<catch>, <error>, <form>, <help>, <link>, <menu>, <meta>, <metadata>, <noinput>, <nomatch>, <prompt>, <script>, <var>.

Parents

none

Variables

none

Example

The following example illustrates a VoiceXML document with the vxml root element.

<?xml version="1.0" encoding="UTF-8"?>
<vxml xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"
   version="2.0">
 <meta name="author" content="VoiceXML 2.0"/>
 <meta name="maintainer" content="productsupport@chant.net"/>
 <var name="hi" expr="'Hello World!'"/>
 <form>
   <block>
      <value expr="hi"/>
      <goto next="#say_goodbye"/>
   </block>
 </form>
 <form id="say_goodbye">
   <block>
      Goodbye!
   </block>
 </form>
</vxml>

Version Information

Supported in: VoiceXML 1.0, VoiceXML 2.0, and VoiceXML 2.1.