How to create XML with multiple loop

Highlighted
Four Stars pn
Four Stars

How to create XML with multiple loop

hi,

How can I build a XML with multiple loop elements , I have tried with tAdvancedFileOutputXML but it doesn't support more than 1 loop element.

PFA an attached XML, I have multiple customers in a single XML and each customer has multiple Address and payment type information. How can I achieve this using Talend component.

BTW my input data is from a Database.

 

I have to build this job in Free TOS edition only (using TOS V6.4.1 )

 

Any help will be appreciated.


Accepted Solutions
Community Manager

Re: How to create XML with multiple loop

You can do this with Talend's Enterprise Edition (or Data Fabric) using the Talend Data Mapper. Unfortunately, that doesn't appear to be an option for you. But there is another way. You can build your XML in sections and then "glue" it together. I describe this in this post in the old Talend forum.... https://www.talendforge.org/forum/viewtopic.php?id=54784

 


All Replies
Community Manager

Re: How to create XML with multiple loop

You can do this with Talend's Enterprise Edition (or Data Fabric) using the Talend Data Mapper. Unfortunately, that doesn't appear to be an option for you. But there is another way. You can build your XML in sections and then "glue" it together. I describe this in this post in the old Talend forum.... https://www.talendforge.org/forum/viewtopic.php?id=54784

 

Four Stars pn
Four Stars

Re: How to create XML with multiple loop

Thanks, I will follow the link and try to implement that way.
One Star

Re: How to create XML with multiple loop

Hi,

 

Can you explain the solution on how you solved it? we are facing similar issue and want to know how to implement it?

 

Thanks

Lokanath

Five Stars

Re: How to create XML with multiple loop

Hi, there,

 

I have a nested XML structure like:

 

<?xml version="1.0" encoding="UTF-8"?>
<Account>
<name>AccountXML1</name>
<phone>123456</phone>
<Contact>
<lastname>Book1</lastname>
<department>EN</department>
</Contact>
<Contact>
<lastname>Book2</lastname>
<department>FR</department>
</Contact>
</Account>

 

I want to extract data as:

Account-

Name,Phone

AccountXML1,123456

 

Contact-

LastName,Department

Book1,EN

Book2,FR

 

How can I do it in Talend? I have tried with tFileInputMSXML but unable to understand how to provide multiple XPath queries

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download