AnsweredAssumed Answered

How can I combine these two documents

Question asked by gouthamr388096 on Dec 23, 2017
Latest reply on Dec 23, 2017 by taurean.sutton070616

Hi Guys,

 

I have the following two XML's which are identical. The first XML has one element named PaymentMethod missing in Header area and few elements in Item area. This is by design. The second one is a full XML. I wanted to combine these two XML's

 

First XML

<CashSale>
<customForm internalId="136"></customForm>
<entity internalId="3050"></entity>
<tranDate>2017-12-23T07:49:30.418+00:00</tranDate>
<department internalId="6"></department>
<location internalId="25"></location>
<subsidiary internalId="5">
<name>JARF</name>
</subsidiary>
<memo>Ecomm Cash Sale for the 12-23</memo>
<subTotal>6.0000</subTotal>
<total>11.7500</total>
<itemList>
<item>
<item internalId="5022"></item>
<amount>2.5100</amount>
</item>
</itemList>
</CashSale>

 

Second XML

 

<CashSale>
<customForm internalId="136"></customForm>
<entity internalId="3050"></entity>
<tranDate>2017-12-23T07:49:30.531+00:00</tranDate>
<department internalId="6"></department>
<location internalId="25"></location>
<subsidiary internalId="5">
<name>JARF</name>
</subsidiary>
<memo>Ecomm Cash Sale for the 12-23</memo>
<paymentMethod>4</paymentMethod>
<subTotal>6.0000</subTotal>
<total>11.7500</total>
<itemList>
<item>
<item internalId="1872"></item>
<quantity>2</quantity>
<description>Makeup Mist &amp;amp; Set</description>
<rate>3.000000</rate>
<amount>6</amount>
<customFieldList>
<KWI_Sales_Tax>0.8000</KWI_Sales_Tax>
<EComm_Shipping_Cost>4.9500</EComm_Shipping_Cost>
</customFieldList>
</item>
</itemList>
</CashSale>

 

I want to use DataProcess shape and combine the above two documents like so (see below). I am unable to get desired output XML with this. Can anyone suggest please. This is how I want the output. I want the Item from both the XML's to be combined.

 

<CashSale>
<customForm internalId="136"></customForm>
<entity internalId="3050"></entity>
<tranDate>2017-12-23T07:49:30.531+00:00</tranDate>
<department internalId="6"></department>
<location internalId="25"></location>
<subsidiary internalId="5">
<name>JARF</name>
</subsidiary>
<memo>Ecomm Cash Sale for the 12-23</memo>
<paymentMethod>4</paymentMethod>
<subTotal>6.0000</subTotal>
<total>11.7500</total>
<itemList>
<item>
<item internalId="1872"></item>
<quantity>2</quantity>
<description>Makeup Mist &amp;amp; Set</description>
<rate>3.000000</rate>
<amount>6</amount>
<customFieldList>
<KWI_Sales_Tax>0.8000</KWI_Sales_Tax>
<EComm_Shipping_Cost>4.9500</EComm_Shipping_Cost>
</customFieldList>
</item>

<item>
<item internalId="1872"></item>
<quantity>2</quantity>
<description>Makeup Mist &amp;amp; Set</description>
<rate>3.000000</rate>
<amount>6</amount>
<customFieldList>
<KWI_Sales_Tax>0.8000</KWI_Sales_Tax>
<EComm_Shipping_Cost>4.9500</EComm_Shipping_Cost>
</customFieldList>
</item>
</itemList>
</CashSale>

Outcomes