I am reading the sales order .csv file, Here is my sample csv look like
SNo,Customer_id,Itemid,Product,Quanity,Price']
1 , ABC123 , 10 , X1 , 1001 , 10001
1 , ABC123 , 20 , X2 , 1002 , 10002
2 , CBC321 , 10 , X5 , 1005 , 10005
2 , CBC321 , 20 , X6 , 1006 , 10006
In the above sample, SNo, Customer is header and Itemid, Product, Quantity, Price is subitems. I need to generate the payload in below format
<SNo>1 </SNo<Customer_idABC123 </Customer_id>
<Itemid10 </Itemid>
<ProductX1 </Product>
<Quanity1001 </Quanity>
<Price']10001</Price']>
<Itemid20 </Itemid>
<ProductX2 </Product>
<Quanity1002 </Quanity>
<Price']10002</Price']>
<SNo>2 </SNo<Customer_idCBc321</Customer_id>
<Itemid10 </Itemid>
<ProductX5 </Product>
<Quanity1005 </Quanity>
<Price']10005</Price']>
<Itemid20 </Itemid>
<ProductX6 </Product>
<Quanity1006 </Quanity>
<Price']10006</Price']>
How to generate the payload in the above format?