We are getting XML that has both text and impages as below. What is the best way to read the images and insert them at a <p> tag in the text, position mentioned by the image attribute? Appreciate any help.
Ex:
<txtbody>
<p>paragraph1</p><p>paragraph2</p><p>paragraph3</p>
</txtbody>
<image>
<image_url><image_orig_url><image_caption>2006 Lexus GS1</image_caption>
<width>100</width>
<position>0</position>
</image>
<image>
<image_url><image_orig_url><image_caption>2006 Lexus GS2</image_caption>
<width>100</width>
<position>1</position>
</image>
<image>
<image_url><image_orig_url><image_caption>2006 Lexus GS3</image_caption>
<width>100</width>
<position>2</position>
</image>
Ex:
<txtbody>
<p>paragraph1</p><p>paragraph2</p><p>paragraph3</p>
</txtbody>
<image>
<image_url><image_orig_url><image_caption>2006 Lexus GS1</image_caption>
<width>100</width>
<position>0</position>
</image>
<image>
<image_url><image_orig_url><image_caption>2006 Lexus GS2</image_caption>
<width>100</width>
<position>1</position>
</image>
<image>
<image_url><image_orig_url><image_caption>2006 Lexus GS3</image_caption>
<width>100</width>
<position>2</position>
</image>