Reader small image

You're reading from  Getting Started with Talend Open Studio for Data Integration

Product typeBook
Published inNov 2012
Reading LevelIntermediate
PublisherPackt
ISBN-139781849514729
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Jonathan Bowen
Jonathan Bowen
author image
Jonathan Bowen

Jonathan Bowen is an E-commerce and Retail Systems Consultant and has worked in and around the retail industry for the past 20 years. His early career was in retail operations, then in the late 1990s he switched to the back office and has been integrating and implementing retail systems ever since. Since 2006, he has worked for one of the UKs largest e-commerce platform vendors as Head of Projects and, later, Head of Product Strategy. In that time he has worked on over 30 major e-commerce implementations. Outside of work, Jonathan, like many parents, has a busy schedule of sporting events, music lessons, and parties to take his kids to, and any downtime is often spent catching up with the latest tech news or trying to record electronic music in his home studio. You can get in touch with Jonathan at his website: www.learnintegration.com.
Read more about Jonathan Bowen

Right arrow

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 we need to adhere to is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<DISPATCH_DOCKET>
<ORDER ID="1000">
<ORDER_LINE ID="1" SKU="123456789" QUANTITY="1" DISPATCHED_DATE="2011-01-01 12:00" TRACKING_ID="ABC12345"/>
<...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Getting Started with Talend Open Studio for Data Integration
Published in: Nov 2012Publisher: PacktISBN-13: 9781849514729

Author (1)

author image
Jonathan Bowen

Jonathan Bowen is an E-commerce and Retail Systems Consultant and has worked in and around the retail industry for the past 20 years. His early career was in retail operations, then in the late 1990s he switched to the back office and has been integrating and implementing retail systems ever since. Since 2006, he has worked for one of the UKs largest e-commerce platform vendors as Head of Projects and, later, Head of Product Strategy. In that time he has worked on over 30 major e-commerce implementations. Outside of work, Jonathan, like many parents, has a busy schedule of sporting events, music lessons, and parties to take his kids to, and any downtime is often spent catching up with the latest tech news or trying to record electronic music in his home studio. You can get in touch with Jonathan at his website: www.learnintegration.com.
Read more about Jonathan Bowen