You probably want to look at respond_to.
respond_to do |wants|
... render html ...
... render xml ...
There are a few tutorials/examples around as well.
Keep up to date with Rails on Twitter and This Week in Rails
Policies: Conduct, License, Maintenance, Security, Trademarks