# Writing an imgae tag in to\_xml

**URL:** <https://www.ruby-forum.com/t/writing-an-imgae-tag-in-to-xml/166667>\
**Category:** Rails\
**Created:** [April 28, 2009, 12:07pm UTC](https://www.ruby-forum.com/t/writing-an-imgae-tag-in-to-xml/166667 "2009-04-28T12:07:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [April 28, 2009, 12:07pm UTC](https://www.ruby-forum.com/t/writing-an-imgae-tag-in-to-xml/166667/1 "2009-04-28T12:07:38Z")

</div>

Hi,  
I am trying to create an pdf report by using ruby jasper pages. For that  
I have written customer\_list.rxml file like this:

xml.instruct!  
xml.customer\_list\_result do  
xml.invoice\_customers do  
@customers.each do |customer|  
xml \<\<  
customer.to\_xml(:dasherize=\>false,:skip\_instruct=\>true,:only=\>[:id,:name,:city],:root=\>“customer”)  
end  
end  
end

I want to add an image tag into this xml data, so that image will be  
displayed on the pdf.  
I have customer\_image field in customers table.  
Can anyone help me out for this?

Thanks,  
Tushar
