# Adding VoiceXML elements and attributes

In VoiceXML, you must use both opening and ending tags to define parts of your document. The VoiceXML processing of element tag names is case sensitive. The VoiceXML browser URLs must be case-consistent to avoid duplicate loads. For example, do not name one file A.vxml and another a.vxml.

All tags and attributes are valid only if they are lower case.

The VoiceXML editor provided with the Voice tools uses the VoiceXML 2.1 Document Type Definitions (DTD). Appendix B of the VoiceXML 2.1 specification: http://www.w3.org/TR/voicexml21/ contains the VoiceXML DTD attribute list by element types.

Conventions in the VoiceXML editor include the following:

- If you add a body in the element, use an ending tag. Text content will generally be spoken.
- If you do not add a body, add a slash at the end of the element.
- By default, in the color coding of source code in the VoiceXML editor, attributes will be blue and tags will be green. (You can reset them using the XML style preferences.)
- VoiceXML elements that are defined in the VoiceXML specification as empty elements (that is, should not have any text between the element tag and its associated close element tag) will be identified by the VoiceXML editor as errors if there is text between the element tag and its close tag. This is a result of the strict XML validation being done by the Voice tools.
- VoiceXML documents must contain a processing instruction line, for example:

       <?xml version="1.0" encoding="iso-8859-1"?>.

  Files created by the Voice tools will automatically have this line created for them.

Note: If you delete comment blocks, be careful to remove both the beginning and ending comment symbols. For example, if you forget to delete the closing comment symbols in a script element, validation will not flag an error, but the VoiceXML execution will fail.

You can use the Content Assist pop-up window to provide suggestions for valid tags and for replacing invalid tags.

See Section 4 of the VoiceXML specification 2.0 (see link above) for the list of elements.

Related Information
What is VoiceXML?
VoiceXML coding tips
Content assist in the VoiceXML editor
Creating a VoiceXML file
Troubleshooting a VoiceXML file