Render XML

The Render XML task takes an XML tree for a specified schema and converts it to a string or binary element that contains the XML document. This task can be paired with the Parse XML task to convert the parsed XML back into a string or binary field for transmission within a message.

XML documents are sometimes stored in string or binary fields to improve the performance of message transmission or for other reasons. You may want to view or manipulate the data within the document then replace the document in the message before transmission to a target operation or mediation operation. Also, the target or mediation operation in your mediation flow may expect to receive all or a subset of the fields within the document.

To render an XML document, you must provide the schema definition for the data. The schema definition must be stored in an XSD within your project. You can use an existing XSD, create an XSD with the XSD editor within TIBCO Business Studio, or you can use your own XSD editor plug-in. See the Eclipse XSD Developer Guide for more information about the XSD editor within TIBCO Business Studio.

The output of the Render XML task is placed into the contributed data portion of the mediation exchange. An element with the same name as the Render XML task is placed into the mediation exchange. The contents of the element is either a string or binary element containing the XML document.

The Render XML task can be placed on an input, output, or fault path.

General Tab

Use the General tab to specify a name, description, and input schema for the task. If the XML document will be stored in binary format instead of text format, you can specify that on the General Tab.

Field Description
Name

Assign a name to the task, to identify the task in the mediation flow. This name appears in the tooltip that opens when you hover the cursor over the task icon in the mediation flow.

This is also the name of the element in the mediation exchange that stores the output of this task.

Description Describe the task briefly. This description appears in the tooltip that opens when you hover the cursor over the task icon in the mediation flow.
Input Schema An XSD stored in the project that describes the structure of the XML document you want to render. The specified schema is used to determine the input schema for this task.
Binary Output Select this box when the XML document will be stored in binary format instead of text format. When this box is cleared, the XML document is stored in a text field.
Encoding Use this field to specify the character encoding used to render the XML string. A list of encodings is provided. If the field is empty the default system encoding is used.
Validate Output

Select this box to enable schema validation of the task output.

If this box is selected and the schema validation fails, the error results in a mediation task fault.

If this box is not selected, validation is not performed; a fault is thrown only if a parse error occurs.

Input Tab

The Input tab is a mapping panel for mapping data from the mediation exchange to the input fields of this task. See Transform Tasks for more information about using a mapping panel.

Field Description
TaskInput

A complex element to hold the input for this task. The sub-element of this element is the schema specified in the Input Schema field on the General tab.

Map values from the mediation exchange to fields in the input schema to create the XML document.

Output Tab

The Output tab is a read-only display of the output schema for this task.