Comment on page
Messages sent using the API are translated into equivalent XHTML tags known as PresentationML, that can be rendered and processed by any HTML client. For example, when you create a message using Create Message v4 , the
messagefield in the response contains the message in PresentationML format.
Messages in PresentationML markup are enclosed in a
<div>tag with the following attributes:
- data-format: must be set to
- data-version: specifies the markup version.
<div data-format=\"PresentationML\" data-version=\"2.0\"> content here... </div>
Since PresentationML was included as part of the MessageML format design, you can create messages by passing the message content in MessageML or in PresentationML. Note that PresentationML uses Structured Objects rather than shorthand tags. Therefore, when you send a message using Create Message v4, the
messageparameter must contain the message content in PresentationML XHTML markup, and the
dataparameter must contain the XML markup for the standard entities referenced in the message.
Shorthand tags translations:
The following table lists XHTML tags for MessageML on the left, and the corresponding PresentationML tags on the right:
<div>tag When retrieving a message using the API, the message is always encapsulated in a root
<div>tag, for easy parsing.
When you create a message using PresentationML, you must include the root
The following is an example of content for a simple message using presentationML markup:
<div data-format=\"PresentationML\" data-version=\"2.0\">
This is a message.
Last modified 2mo ago