Advanced XML output for complex XML structures

The XML output format we used in the last example was pretty straightforward. Every piece of data is contained within its own XML element; however, it is very common for XML files to be more complex, with subelements being repeated within a parent element, and data items being held in XML attributes rather than in elements.

In this example, we will produce an XML file that contains data about customer orders that have been dispatched. This file will contain the following information:

  • The order ID
  • The order-line ID
  • The product SKU for each line
  • The quantity of each dispatched SKU
  • The dispatch date (in the format yyyy-MM-dd hh:mm)
  • The courier tracking ID (so that customers can track their order)

The XML format ...

Get Getting Started with Talend Open Studio for Data Integration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.