Skip to main content
Skip table of contents

XML Output

Overview

The XML Output tool lets you export data into XML format. It does not support field types.

XML data file types

The tool exports three different types of XML data file: Simple Tags, Simple Attributes, and SOAP Arrays.

Simple Tags

Simple tag XML files define the data structure using tag nesting. The first tag to follow the XML declaration (typically of the form <?xml version='1.0' encoding='utf-8'?>) is the root element. This tag encloses a series of row tags, each of which defines a record. Within each row tag, fieldname tags enclose field values. For example:

XML
<ROOT>
   <ROW>
      <FIRMNAME>Data Management</FIRMNAME>
      <CONTACT>John Smith</CONTACT>
   </ROW>
  ...
</ROOT>

Simple Attributes

Simple attribute XML files are similar to simple XML files, except that field values are attributes of the row tag rather than individual elements. For example:

XML
<ROWS>
   <ROW FIRMNAME="Data Management" CONTACT="John Smith"/>
   ...
</ROWS>

SOAP

SOAP is an XML protocol designed for exchanging structured information in a decentralized, distributed environment. Refer to the World Wide Web Consortium web site for technical details.

Within the XML Output tool, a SOAP array is defined as having an argname, an arrayname, and a recordname. Argname is equivalent to the request element. Array name identities the rows, record name the records.

XML Output tool configuration parameters

The XML Output tool has one set of configuration parameters in addition to the standard execution options.

Parameter

Description

Output to

The destination of the data:

  • File: write to the specified data file or split file names derived from the specified file. This is the default.

  • Field: write to the field on the input connection, treating the stream of data as wildcarded files.

Output file

If Output to is File, the output file name.

Open file time

If Output to is File, specifies when the output file will be opened:

  • Default

    • Uses the site/execution server setting

  • When project is started

  • When first record is read

  • When last record is read

Write empty file if no records are read

If Output to is File, write an output file even when no records are read. This is unavailable if Open file time is When project is started.

Output field

If Output to is Field, the output field name.

Include input fields

If Output to is Field, include input fields on output.

Layout
Save layout
Save schema

If selected, saves the output as the specified layout file or repository schema.

XML format

Select the type of XML data to output: Simple attributes, Simple tags, or SOAP array. This is optional and defaults to Simple attributes.

XML root tag

If XML format is Simple tags or Simple attributes, specifies the XML root document tag.

XML row tag

If XML format is Simple tags or Simple attributes, specifies the XML tag under which rows can be found.

SOAP element base

If XML format is SOAP, specifies the XML tag containing the output record.

Set NIL attributes

If selected, empty elements have the attribute xsi:nil="true" added. This is used in some formats such as data files targeted at Crystal Reports.

Field

Name that uniquely names the field amongst all fields in the record.

Type

Sub-configuration describing the type of the new field. See Configuring Data Types.

Split files
Split records

If selected, splits the output file by Size, Record count, or Data.

Split size (MB)

If Split files by size is selected, specifies the maximum size of the split files. Output file names are appended with a sequence number between the file root and the extension. Defaults to 1024 MB (1Gb).

If Split records by size is selected, specifies Split size as the maximum payload size (in megabytes).

Split count

If Split files by record count is selected, specifies the maximum number of records in the split files. Output file names are appended with a sequence number between the file root and the extension. Defaults to 1,000,000.

If Split records by record count is selected, specifies Split count as maximum number of records in payload.

Split field

If Split files by data is selected, name of the field to be used to split the data. A separate file or payload will be created for each unique value of the specified field.

Data must be grouped by the split field.

Suppress split field

If selected, the Split field is omitted from files created using Split files by data.

Treat output file as folder

If selected, the Split field value is used as file name for files created using Split files by data.

Replication factor

Number of copies of each block that will be stored (on different nodes) in the distributed file system. The default is 1.

Block size (MB)

The minimum size of a file division. The default is 128 MB.

Configure the XML Output tool

The procedure for configuring an XML Output tool depends on the data target.

If the data target is...

Do this

A file or files

Configure the XML Output tool to write files

A field or datastream

Configure the XML Output tool to write fields

...to write files

To configure the XML Output tool to write files:

  1. Select the XML Output tool.

  2. Go to the Configuration tab on the Properties pane.

  3. Select Output to and choose File, and then specify the output file.

  4. Optionally, specify Open file time.

Option

Description

Default

Use the site/execution server setting. If you select this, you can optionally select Write empty file if no records are read. A warning will be issued if the tool setting conflicts with the site/execution server setting.

When project is started

Open output file when the project is run.

When the first record is read

Open output file when the first record is read. If you select this, you can optionally select Write empty file if no records are read.

After the last record is read

Output records are cached and not written to the output file until the tool receives the final record. If you select this, you can optionally select Write empty file if no records are read.

  1. Select Write empty file if no records are read to write an output file even when no records are read.

  2. Select the XML format from the list.

    • If you specify Simple tags or Simple attributes, type in the XML root tag and XML row tag identifiers (without angle braces < >).

    • If you specify SOAP, type in the SOAP element base (without angle braces < >).

  3. Optionally, select Set NIL attributes to add the attribute xsi:nil="true" to empty elements.

  4. Optionally, you can split the output file into smaller, more manageable pieces. Check the Split files box, and then select By size, By record count, or By data.

    • If you select Split files by size, specify Split size as the maximum file size (in megabytes). The resulting output files will have the name you specified, with a sequential number appended.

    • If you select Split files by record count, specify Split count as maximum number of records. The resulting output files will have the name you specified, with a sequential number appended.

    • If you select Split files by data, select the desired Split field name from the drop-down list. Data must be grouped by the split field. The resulting output files will have the name you specified, augmented by inserting the value of the specified field before the extension. For example, splitting output by ZIP Code produces file names of the form output_file01234.xml.

  5. To generate file names where the entire name is determined by the value of the specified field, select Treat output file as folder and specify the output directory in the Output file box, using the form: F:\output_directory.

  6. If you do not want the specified field to appear in the output, select Suppress split field.

  7. Optionally, go to the Execution tab and Enable trigger output, configure reporting options, or set Web service options.

...to write fields

To configure the XML Output tool to write fields:

  1. Select the XML Output tool.

  2. Go to the Configuration tab on the Properties pane.

  3. Select Output to and choose Field, and then enter an Output field name.

  4. Select Write empty field if no records are read to write an output field even when no records are read.

  5. Select the XML format from the list.

    • If you specify Simple tags or Simple attributes, type in the XML root tag and XML row tag identifiers (without angle braces < >).

    • If you specify SOAP, type in the SOAP element base (without angle braces < >).

  6. Optionally, select Set NIL attributes to add the attribute xsi:nil="true" to empty elements.

  7. Optionally, you can split the output into smaller, more manageable packets to be sent to a web service or put in a queue. Select Split records, and then choose By size, By record count, or By data.

    • If you select Split records by size, specify Split size as the maximum payload size (in megabytes).

    • If you select Split records by record count, specify Split count as maximum number of records.

    • If you select Split files by data, select the desired Split field name from the drop-down list. Data must be grouped by the split field.

  8. If you do not want the specified field to appear in the output, select Suppress split field.

  9. Optionally, go to the Execution tab and configure reporting options or set Web service options.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.