Message tree

The message tree is a part of the logical message tree in which the broker stores its internal representation of the message body.

The root of a message tree is called Root. The message tree is always present, and is passed from node to node within a single instance of a message flow.

The message tree includes all the headers that are present in the message, in addition to the message body. It also includes the properties subtree (described in Parsers), if that is created by the parser. If a supplied parser has created the message tree, the element representing the properties subtree is followed by none or more headers.

If the message has been received across the WebSphere MQ Enterprise Transport, WebSphere MQ Mobile Transport, or WebSphere MQ Telemetry Transport, the first header (the second element) must be the MQMD. Any additional headers included in the message appear in the tree in the same order as in the message. The last element beneath the root of the message tree is always the message body.

If a user-defined parser has created the message tree, the Properties tree, if present, is followed by the message body.

The message tree structure is shown below. If the input message is not a WebSphere MQ message, the headers shown might not be present. If the parser that created this tree is a user-defined parser, the Properties tree might not be present.


Message tree structure created by an input node and parser for a message received across a transport that uses WebSphere MQ.

The Body tree, a structure of child elements (described below) that is determined by the parser, represents the message content (data). The message body might be:

Each element within the parsed tree is one of three types: 

Name element
A name element has a string associated with it, which is the name of the element. An example of a name element is XMLElement, described in XML element.
Value element
A value element has a value associated with it. An example of a value element is XMLContent, described in XML content.
Name-value element
A name-value element is an optimization of the case where a name element contains only a value element and nothing else. The element contains both a name and a value. An example of a name-value element is XMLAttribute, described in XML attribute.

For information about how the message tree is populated, see How the message tree is populated.

Related concepts
Parsers
Message modeling
Related tasks
Developing message flow applications
Configuring ESQL within nodes
Manipulating message body content
Related reference
Built-in nodes
ESQL