Check out the tip at http://rails.techno-weenie.net/tip/2005/12/31/accepting_xml_or_yaml_in_your_rest_api.
(Disclosure: I wrote the tip.)
Sponsored By: