Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

xml create with multiple loop

Hi,

I have requirement where i need to create acknowledgement xml file and below is the logic:

 

Ack message should be nested in a way that , if the message has multiple Addresses and each Address has multiple Contacts/Banks, then i need to send a single acknowledgement message with status for each Address Section and the corresponding Contacts/Banks that are linked to that Address. Data example is below.

 

-->I have tried to use txmlmap component but it seems grouping is not working correctly. I have attached xml file which i am getting as a result but it is not in correct format as described in logic.

 

---> for duplicate address id <common:address id="S00195003"> it should grouped in one tag, can someone help me to achieve this.

0683p000009LvrM.png0683p000009LvgZ.png

 

<?xml version="1.0" encoding="UTF-8"?>
<common0683p000009M9p6.pngubscriptionProcessAcknowledge xmlns:common="http://common.subscription.partyconnect.ge.com">
<common:messageId>0386639a-22db-4e15-b032-a213690be59a</common:messageId>
<common:transactionId>517560</common:transactionId>
<common:externalTransactionId/>
<common:downstreamOrgId>9792</common:downstreamOrgId>
<common:delivered>True</common:delivered>
<common:status>FAILURE</common:status>
<common:message>Data not saved in ERP</common:message>
<common0683p000009MAB6.pngarty id="S00195">
<common:status>SUCCESS</common:status>
<common:message/>
<common:downstreamEntityId>10142</common:downstreamEntityId>
<common:address id="S00195003">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
<common:bankAccount id="BA-0000-0000-0000-0001">
<common:status>SUCCESS</common:status>
<common:message/>
<common:downstreamEntityId>11111/bank01</common:downstreamEntityId>
</common:bankAccount>
<common:contact id="CO-0000-0000-0000-0622">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
</common:contact>
</common:address>
<common:address id="S00195003">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
<common:bankAccount id="BA-0000-0000-0000-0002">
<common:status>SUCCESS</common:status>
<common:message/>
<common:downstreamEntityId>11111/bank02</common:downstreamEntityId>
</common:bankAccount>
<common:contact id="CO-0000-0000-0000-0624">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
</common:contact>
</common:address>
<common:address id="S00195004">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
<common:bankAccount id="BA-0000-0000-0000-0003">
<common:status>SUCCESS</common:status>
<common:message/>
<common:downstreamEntityId>11111/bank03</common:downstreamEntityId>
</common:bankAccount>
<common:contact id="CO-0000-0000-0000-0625">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
</common:contact>
</common:address>
</common0683p000009MAB6.pngarty>
</common0683p000009M9p6.pngubscriptionProcessAcknowledge>

Labels (4)
20 Replies
mayo
Contributor III
Contributor III

I've never used the txmlmap component so I would not be able to help on how to configure it for the looping you want, however i know that the Talend Data Mapper can do what you want (tHMap component).  It has a steep learning curve, but it can pretty much manipulate your data set however you want it.  Do you have access to this component?

Anonymous
Not applicable
Author

If you are using the Enterprise Edition, then use the Talend Data Mapper. If not, this answer I gave on the old forum might help...

https://www.talendforge.org/forum/viewtopic.php?id=54784&_ga=2.48489327.832598656.1502749482-2037499...

Anonymous
Not applicable
Author

Hi,

 

Could you upload an example input file and the expected output XML file ?

 

Eric

Anonymous
Not applicable
Author

Hi Eric,

 

Please find attached inupt file and example xml that we need to generate.

 

 

Thanks 

PK


Bulk_Upload_Acknowledgment_Latest_TEST.xlsx
sc-pubsub-new-supplier-ack-async-bulk.xml
Anonymous
Not applicable
Author

Do you want three output xml files (One per csv line) or a single one (I understodd you wanted to combine lines) ?

Anonymous
Not applicable
Author

Hi Eric,

 

It should be one per input csv lines.

 

Each xml must contain all the entities that are part of that message(messageid) and nested correctly. i.e. if the message has multiple Addresses and each Address has multiple Contacts/Banks, then i need to create a single acknowledgement message(xml) with status for each Address Section and the corresponding Contacts/Banks that are linked to that Address.

 

Hope this makes sense to you.

 

Thanks

PK

Anonymous
Not applicable
Author

Hi,

 

I could suggest a solution with data mapper (It should be possible with tXmlMap. You will have to look at URL given by rhall_2_0).

Do you have data mapper (It is included only in platform version not in free version) ?

 

Eric

Anonymous
Not applicable
Author

Hi Eric,

 

I am working on Enterprise edition , so i have data mapper.

 

Can you please provide a solution.

 

Thanks

PK

Anonymous
Not applicable
Author

It looks like the xml file you uploaded doesn't match the xlsx file you uploaded.

 

In xslx file, there are three lines with message id is 0386639a-22db-4e15-b032-a213690be59a. And I see three XML files with message id below:

1111-1111-0001

1111-1111-0002

1111-1111-0003

 

Could you upload the expected XML for file for the xslx file you uploaded ?

 

Eric