Rake task database to XML export

Hi all…

  I am a new bie of ruby rails. i was working with some task to get

a database table to be exported in to an XMLFile. I need to write a
raketask for that. Can some one please help me with some good stuff
having with you regarding the rake task file written to do that dbtable
to xml file file conversions.
Please help me with some sample code or links

Thanks to all in advance