Within the Compute node, you can create output XML messages by taking information from an input message (which might or might not be XML), from a database, or from other information or calculations. In addition to the general guidance provided in Manipulating message body content, consider the following points:
SET OutputRoot.XMLNS.Invoice.Cashier.(XML.Content) = NULL;
generates the following XML:
<Invoice><Cashier/></Invoice>
An example of badly-formed XML is shown below, where the ESQL constructs two top-level tags:
SET OutputRoot.XMLNS.Element1 = 'a'; SET OutputRoot.XMLNS.Element2 = 'b';
It is possible to create a message tree that, when parsed, results in tags that are written as attributes, attributes that are written as tags, and tags that are not written at all. This might happen, for example, if you copy elements to the output message from an input message that is not an XML message.
It is also possible to create a message in which the contents are not in the expected order; this is further described in Ordering fields in an XML message.
If your message flow does not create an output message successfully, or the output message does not have the content that you expect, check the ESQL code that you have written to create the output message in the Compute node.
You might want to include a test on the data values that you insert into the output message, or use the CAST function.