Existing XML
<ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2013-08-01">
<OperationRequest>
<Arguments>xyz</Arguments>
</OperationRequest>
<Items>
<Item>
<ItemId>123<ItemId>
<CustomerReviews>
<IFrameURL>someurl</IFrameURL>
<HasReviews>true</HasReviews>
</CustomerReviews>
<EditorialReviews>
<Content>text</Content>
</EditorialReviews>
<Item>
</Items>
Need to convert it to
<ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2013-08-01">
<OperationRequest>
<Arguments>xyz</Arguments>
</OperationRequest>
<Items>
<Item>
<ItemId>123<ItemId>
<CustomerReviews>
<CustomerReview>
<ReviewText>abc<ReviewText>
<ReviewDate>May 24, 2015<ReviewDate>
</CustomerReview>
<CustomerReview>
<ReviewText>def<ReviewText>
<ReviewDate>June 24, 2014<ReviewDate>
</CustomerReview>
<HasReviews>true</HasReviews>
</CustomerReviews>
<EditorialReviews>
<Content>text</Content>
</EditorialReviews>
<Item>
</Items>
I am able to remove IFrameURL and able to insert node CustomerReview before HasReviews, but how can I add more nodes inside CustomerReview. Here is what I have achieved till now using other Stack overflow post.
<ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2013-08-01">
<OperationRequest>
<Arguments>xyz</Arguments>
</OperationRequest>
<Items>
<Item>
<ItemId>123<ItemId>
<CustomerReviews>
<CustomerReview>hello</CustomerReview>
<CustomerReview>hello</CustomerReview>
<CustomerReview>hello</CustomerReview>
<HasReviews>true</HasReviews>
</CustomerReviews>
<EditorialReviews>
<Content>text</Content>
</EditorialReviews>
<Item>
</Items>
PS: XML structure have /ItemLookupResponse at the end, but not visible in the code.