Render XML

Render XML is a synchronous activity that takes an instance of an XML schema element and renders it as a stream of bytes containing XML or an XML string.

Rendering Date and Datetime Strings

The Render XML activity takes an instance of an XML schema element and renders it as a stream of bytes containing XML or an XML string. The schema is processed based on the XSD file specified.

UTC time is used when datetime strings are generated. For example, the time 55 minutes, 31 seconds, and 112 milliseconds after 2.00 p.m.on February 10th, 2002 would be represented by the Render XML activity as 2002-02-10T14:55:31.112Z

The General tab has the following fields.

Field Literal Value/Process Property/Module Property Description
Name No The name to be displayed as the label for the activity in the process.
Output Style No Specifies whether the output should be text or binary data.
Validate Input No When selected, specifies that the data input to the activity should be validated against the schema specified in the Input Editor tab.

By default, the check box is clear.

Format Using Default Namespace Prefix No Prepends the namespace with the default namespace prefix.
Disable Pretty Print No Returns output data in the form of non formatted XML.

By default, the check box is clear.

Suppress XML Declaration No Removes XML declaration in the beginning of a XML document of the form <?xml version = "1.0" encoding = "UTF-8" standalone = "no" ?>.

By default, the check box is clear.

Encoding Yes This field is visible only when the Output Style field is first set to Binary, then set to Text. This field specifies the encoding value to place into the XML header of the rendered XML data.

You can specify any valid XML encoding value listed in IANA-Charsets.

Description

Provide a short description for the activity.

Advanced

Click the Advanced tab and specify which elements in the input schema can contain CDATA sections. Using CDATA sections you can enclose text within an element that should not be treated as XML.

Click the Add button to add elements of the input schema to the list. When you click the Add button, a dialog displays. Using this dialog locates and selects the input schema by location in the project or by namespace. Use the By Location tab if your input schema is located in the project directory. Use the By Namespace tab if you constructed the input schema on the Input Editor tab.

Use the X button to remove the elements from the list and the up and down arrows to move elements in the list.

Input Editor

From the Input Editor tab, you can define a schema for the incoming XML data you want to render.

The following is the input for the activity.

Input Item Type Description
byteEncoding string This is only available when you set the Output Style field in the General tab to binary.

This specified the encoding value to place into the XML header in the rendered XML output. This is also the encoding used to encode the binary data. If this item is not specified, the default encoding of the java virtual machine used by the process engine is used to encode the binary data. This value may not be a valid XML encoding.

You can specify any valid XML encoding value listed in IANA-Charset. For a complete list, refer to http://www.iana.org/assignments/character-sets. The encoding names are case sensitive.

XML Schema string The XML schema to render. The contents of the schema are determined by the schema specified in the Input Editor tab.

Output

The following is the output of the activity.

Output Item Type Description
xmlString string Available when Text is selected in the Output Style field in the General tab. This item contains a stream of bytes representing the rendered XML.
xmlBytes bytes Available when Binary is selected in the Output Style field in the General tab. This item contains a stream of bytes representing the rendered XML.

Fault

The Fault tab lists the possible exceptions generated by this activity. For more information about error codes and the corrective action to take, see the TIBCO ActiveMatrix BusinessWorks™ Error Codes guide.

Fault Generated When..
XMLRenderException An exception occurred when rendering the data.
UnsupportedEncodingException An unsupported encoding was specified in the byteEncoding input item.
MissingByteCountException An exception occurred while rendering the data with an invalid or missing byte count.