XML Serialization

The entities are serialized to XML, before they are added to the Magic Envelope.

Root element

The root element is named like the entity-name in snake_case.

Examples: status_message, comment, like


The properties are added as child-elements, with the value string-serialized as described in value formats as content of the element.

The order of the elements is not specified.

Elements may be empty, if they have no value.

Unknown elements must be ignored while parsing (except for signature-verification of relayables).

Nested Entities

Some entities have other entities as properties. The XML of the nested entity is nested into the root element of the parent entity. The same entity-type can be nested multiple times (e.g. poll_answer in poll).


  <text>I am a very interesting status update</text>