-
Then select the tAdvancedFileOutputXML
component and click on the Component settings
tab to configure the basic settings as well as the mapping. Note that a
double-click on the component will open directly the mapping interface.
-
In the File Name field, browse to the file to
be written if it exists or type in the path and file name that needs to be
created for the output.
By default, the schema (file description) is automatically propagated from the
input flow. But you can edit it if you need.
-
Then click the [...] button or double-click
on the tAdvancedFileOutputXML component on the
design workspace to open the dedicated mapping editor.
To the left of the interface, are listed the columns from the
input file description.
-
To the right of the interface, set the XML tree panel to reflect the expected
XML structure output.
In this example, an XML template is used to populate the XML tree
automatically.
-
Right-click on the root tag displaying by
default and select Import XML tree at the end
of the contextual menu options.
-
Browse to the XML file to be imported and click OK
to validate the import operation.
-
Then drag & drop each column name from the Schema
List to the matching (or relevant) XML
tree elements as described in Mapping XML data.
The mapping is shown as blue links between the left and right panels.
Finally, define the node status where the loop should take place. In this use
case, the Cast being the changing element on which the
iteration should operate, this element will be the loop element.
Right-click on the Cast element on the XML tree, and select Set as loop element.
-
To group by movie, this use case needs also a group element to be
defined.
Right-click on the Movie parent node of the XML tree, and select Set as group element.
The newly defined node status show on the corresponding element lines.
-
Click OK to validate the
configuration.
-
Press F6 to execute the Job.
The output XML file shows the structure as defined.