Ektron CMS400.Net Reference
While creating a form that generates email, you can specify that the email be sent as XML data or plain text.
XML has the following advantages over plain text.
Because XML data is structured, you can easily parse the content to store and retrieve important information.
If you download the form data to an Excel spreadsheet, the XML tags become the spreadsheet’s column headers. See Also: Exporting a Form’s Raw Data
This section contrasts XML and plain text email using the form displayed below as the example. Here is an example of a form before it is submitted.
The following table displays the resulting email, depending on the method used.
Form sent as |
Generated email |
Plain Text |
|
XML |
|
A form’s XML structure consists of two groups of XML tags:
Form and mail elements
Data elements
The following image illustrates the sections of XML email structure.
The following explains the sections of the XML email.
The XML email is wrapped in <cmsMail> root tags.
The form and mail tags display information about the form that was generated from the form information.
This illustration compares the information defined for the form with the information in the XML email.
The following table explains each XML tag in the form and mail sections of the email.
XML Tag |
Description |
<FormTitle> |
Title given to the form that was submitted. |
<FormDescription> |
Description given to the form that was submitted. |
<date> |
Date and time the form was submitted. |
<MailTo> |
To email address(es) defined in the form. |
<MailFrom> |
From email address(es) defined in the form. |
<MailCc> |
CC address(es) defined in the form. |
<MailSubject> |
Subject for the generated email defined in the form. |
<MailPreamble> |
Preamble for the generated email defined in the form. |
The XML email’s data tags wrap the information entered by the form’s submitter. Each form element in the content becomes an XML tag.
The following image illustrates how a form is edited in the editor, displayed on a Web page, and then converted to XML for the email.
As shown in the graphic, the content is comprised of form elements that are converted to XML tags.