Generating the XML with one to many data

I do have the data coming from the source like this and I need to Crete the XML file as the output. Output should looks like this. Is there any way I can achieve this?
image

Desired output
image