Skip to main content Skip to complementary content

Configuring the XML output and mapping

Procedure

  1. 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.
  2. 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.
  3. 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.
  4. To the right of the interface, set the XML tree panel to reflect the expected XML structure output.
    You can create the structure node by node. For more information about the manual creation of an XML tree, see Defining the XML tree.
    In this example, an XML template is used to populate the XML tree automatically.
  5. Right-click on the root tag displaying by default and select Import XML tree at the end of the contextual menu options.
  6. Browse to the XML file to be imported and click OK to validate the import operation.
    Information noteNote:

    You can import an XML tree from files in XML, XSD and DTD formats.

  7. 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.
  8. 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.
  9. Click OK to validate the configuration.
  10. Press F6 to execute the Job.
    The output XML file shows the structure as defined.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!