AnsweredAssumed Answered

How to combine multiple XML documents to a single/multiple  XML document(s)

Question asked by phani.kumar@enjoy.com on Sep 8, 2017
Latest reply on Sep 12, 2017 by aaron.de.rybel821561

Experts, 

I am a new Bee to Boomi  Need your advice to combine and transform XML documents to a single or mutliple docs based on a particular xml element (in my below case, it is orderNum).  Is it mandatory to go with Groovy or XSLT to achieve my below requirement? 

 

Use case:

Input docs:

=========

document1 :

<orders>

  <order>

     <header>

          <orderNum>111</orderNum>

     <header>

      <lines>

           <line>

                 <seqNum>111-1</seqNum>

           </line>

      </lines>

  </order>

</orders>

 

document2 :

<orders>

  <order>

     <header>

          <orderNum>111</orderNum>

     <header>

      <lines>

           <line>

                 <seqNum>111-2</seqNum>

           </line>

      </lines>

  </order>

</orders>

 

document3:

<orders>

  <order>

     <header>

          <orderNum>222</orderNum>

     <header>

      <lines>

           <line>

                 <seqNum>222-1</seqNum>

           </line>

      </lines>

  </order>

</orders>

 

Expected output:

=============

Document1:

<orders>

  <order>

     <header>

          <orderNum>111</orderNum>

     <header>

      <lines>

           <line>

                 <seqNum>111-1</seqNum>

                 <seqNum>111-2</seqNum>

           </line>

      </lines>

  </order>

</orders>

 

Document2:

<orders>

  <order>

     <header>

          <orderNum>222</orderNum>

     <header>

      <lines>

           <line>

                 <seqNum>222-1</seqNum>

           </line>

      </lines>

  </order>

</orders>

Outcomes