# How to generate an xml file like this one?

**URL:** <https://www.ruby-forum.com/t/how-to-generate-an-xml-file-like-this-one/129657>\
**Category:** Rails\
**Created:** [February 20, 2008, 1:33pm UTC](https://www.ruby-forum.com/t/how-to-generate-an-xml-file-like-this-one/129657 "2008-02-20T13:33:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![differenthink](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/6bbea6/32.png) [@differenthink](https://www.ruby-forum.com/u/differenthink)\
**Post date:** [February 20, 2008, 1:33pm UTC](https://www.ruby-forum.com/t/how-to-generate-an-xml-file-like-this-one/129657/1 "2008-02-20T13:33:56Z")

</div>

Hi,

I ve got this tiny xml example, and i ve to be able to generate it  
dynamically :

##### 

\<FLV\_PLAYLIST\>

 #####

I tried to handle it using rxml… but i guess i m to bad to do it…  
If someone could give me an hand i’ll appreciate it so much !!!

Thanks a lot,

Guillaume.

---

<div class="post-metadata">

**Author:** ![differenthink](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/6bbea6/32.png) [@differenthink](https://www.ruby-forum.com/u/differenthink)\
**Post date:** [February 20, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/how-to-generate-an-xml-file-like-this-one/129657/2 "2008-02-20T13:45:46Z")

</div>

in an xml.builder view:  
xml.flv\_playlist do {  
@movies.each do |movie|  
xml.description(:name =\> “Name”)  
xml.description(:name =\> “Rating”)

xml.video(:name =\> “#{movie.number} (#{movie.length})” Rating=  
movie.rating)  
xml.video(:name =\> “#{movie.number} (#{movie.length})” Rating=  
movie.rating)

end  
}

something like this …
