AnsweredAssumed Answered

Merge XML based on Root Element

Question asked by david.konatschnig on May 9, 2016
Latest reply on May 12, 2016 by david.konatschnig

Hello

I have a business case where i'm sure that has been asked already but i couldn't find an answer.

I recieved Data from a connector, which i use to send emails.

so i get owner elements (or lets say supervisors), which can have multiple users:

<owner>

  <OwnerName>Mike Smith</OwnerName>

  <OwnerEmail>mike.smith@something.com</OwnerEmail>

  <OwnerID>10005193</OwnerID>

  <user>

  <Config>SPEC_1</Config>

  <Username>Max Holden</Username>

  </user>

</owner>

<owner>

  <OwnerName>Mike Smith</OwnerName>

  <OwnerEmail>mike.smith@something.com</OwnerEmail>

  <OwnerID>10005193</OwnerID>

  <user>

  <Config>SPEC_2</Config>

  <Username>John Wayne</Username>

  </user>

</owner>

<owner>

  <OwnerName>Frank Muller</OwnerName>

  <OwnerEmail>frank.muller@something.com</OwnerEmail>

  <OwnerID>100008123</OwnerID>

  <user>

  <Config>SPEC_1</Config>

  <Username>Frank Woods</Username>

  </user>

</owner>

 

 

What i want to do now is send an email to each supervisor (<owner>), with a combined message of the child elements (<user>)

Mike Smith would recieve one email containing two names (max Holden and John Wayne), Frank Muller would recieve one email with one name (Frank Woods).

I tried to map this documents into a new xml profile that has a repeating array of <user> elements, and i also tried to combine the documents but none of it works to get  one <owner> with multiple <user> child elements.

 

Can someone help me out here?

 

thanks a lot

Outcomes