Configuring the XML output and mapping - 7.3

XML connectors

Version
7.3
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > XML components > XML connectors
Data Quality and Preparation > Third-party systems > XML components > XML connectors
Design and Development > Third-party systems > XML components > XML connectors
Last publication date
2024-02-21

Procedure

  1. 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.
  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.
    Note:

    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.