# Creating a VoiceXML file

For each application that you want to create using the Voice tools, create a project in which you will place all the files for the application. Besides VoiceXML files, these might include CCXML files, grammar files, ECMAScript Object files, pre-recorded audio files, and pronunciation files (exception dictionaries and/or pool files).

Tip: Filenames are case-sensitive. For example, do not name one file A.vxml and another a.vxml.

Here are the steps required to create a VoiceXML file:

1. If you do not have a project in which your VoiceXML file will reside, create a project (any project type is supported). Otherwise, select the desired project in the Navigator.
2. You can create a folder in which to place your VoiceXML file. To do this, select File> New > Other > Simple, select Folder, and type the folder name. Folders are optional containers for organizing files within a project.
3. From the File menu, select New > Other > Voice Tools > VoiceXML File.
4. Select how you want to create it (from scratch, resulting in an empty file) or with DTD assistance
5. Click the Next button.
6. Type your new file name (the default extension for a VoiceXML file is .vxml) and select the parent folder where you want the new file placed.
   - Optional: Click Advanced (available in some installed products) to reveal or hide a section of the wizard used to create a linked file. Check the Link to file in the file system check box if you want the new file to reference a file in the file system. In the field below the check box, enter a file path or the name of a path variable. Click Browse to locate a file in the file system. Click Variables if you want to use a path variable to reference a file system file.
7. Either:
   - Click the Finish button to create the file and launch the associated editor.
   Note: The file that is created will either be empty or contain skeleton code. This is based on how you elected to create the file.
   - Click the Next button to select a DTD if you want to use one other than the default. Select the DTD that you want to use and Click the Finish button to create the file and launch the assoicated editor.
8. If you created the file based on a DTD, basic file information is added in the Editor screen. The DOCTYPE declaration is automatically added below the XML processing instruction (<?xml...). The DOCTYPE is necessary to enable validation and Content Assist.
   Note: Some interpreters may require that the DOCTYPE statement be removed.

After the file is created you can continue by adding valid tags and attributes. When you finish, save your file. If XML Validation is enabled on you project (default), any structural or DTD compliance issues will be shown in the problems view and with markers in your document.

#### Using the Edit menu

Use options in the the lowest section of the Edit menu or the right-click contextual menu to assist with viewing and editing your file. You can select menu options such as the following (some options are not available, depending on the open editor):

- Content Format or Format automatically re-formats your code according to the appropriate conventions (available in all grammar editors).
  Note: The option will not work if any text is selected in the grammar editor.
- Cleanup Document opens the Cleanup dialog, which contains settings to update a document so that it is well-formed and formatted.

#### Using Content Assist

The Content Assist function assist in development by opening a pop-up window that provides a list of valid tags for the element or attribute at the cursor location. Cintent Assist is used by placing the cursor at a position in the file where you want assistance and holding down the Ctrl key and pressing the Space bar.

For troubleshooting information, see Troubleshooting a VoiceXML file.

Related Information
What is VoiceXML?
VoiceXML coding tips
Adding a grammar
Adding DTMF input
Validating a VoiceXML file