Ektron CMS400.Net Reference

>>Managing Content > HTML Forms > Sending Data as XML

Sending Data as XML

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

XML email Structure

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.

Root Tag

The XML email is wrapped in <cmsMail> root tags.

Form and Mail 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.

Data Tags

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.


Visit the Ektron Dev Center at http://dev.ektron.com 1-866 - 4 - EKTRON

Ektron CMS400.NET Reference Version 8.02 SP1 Rev 1

Ektron Documentation,© 2011 Ektron, Inc.