XML constructs

A self-defining XML message carries the information about its content and structure within the message in the form of a document that adheres to the XML specification. Its definition is not held anywhere else.

When the integration node receives an XML message, it interprets the message using the generic XML parser, and created an internal message tree structure according to the XML definitions contained within that message.

A self-defining message is also known as a generic XML message. It does not have a recorded format.

The information provided with IBM® Integration Bus does not provide a full definition or description of XML terminology, concepts, and message constructs: it is a summary that highlights aspects that are important when you use XML messages with integration nodes and message flows.

For further information about XML, see the developerWorks® Web site.

Example XML message

The name elements used in this description (for example, XmlDecl) are provided by IBM Integration Bus, and are referred to as field type constants. They are available for symbolic use within the ESQL that defines the processing of message content performed by the nodes, such as a Filter node, within a message flow. They are not part of the XML specification.

A simple XML message might take the form:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE s1 PUBLIC "http://www.ibm.com/example.dtd" "example.dtd">
<s1>.........</s1>

The corresponding syntax element tree (top level elements only) is shown in the following diagram:

Syntax element tree

The WhiteSpace elements within the tree are there because of the line breaks in the original XML document, and have no business meaning. White space is used in XML for readability; if you process XML messages that contain line breaks (as shown above), blanks lines, or spaces between tags, these all appear as elements in the message tree.

WhiteSpace within an XML element (between start and end tags) has business meaning and is represented using the Content syntax element. See XML WhiteSpace and DocTypeWhiteSpace for more information.

The field type constants for XML name elements (for example, Element and XmlDecl) equate to a constant value of the form 0x01000000. You can see these constants in the output created by the Trace node when a message, or a portion of the message, is traced.