That’s going to depend at least partially on what it is you want to do with rails. Rails will generate XML from ActiveRecord objects (and accept some XML as input) by default. Check out:
[http://weblog.jamisbuck.org/2006/3/27/web-services-rails-style](http://weblog.jamisbuck.org/2006/3/27/web-services-rails-style)
[http://jystewart.net/process/2007/02/input-formats-and-content-types-in-rails-12/](http://jystewart.net/process/2007/02/input-formats-and-content-types-in-rails-12/)
Rails itself makes use of Builder, so for anything more complex you’d be best off checking that out first.
[http://builder.rubyforge.org](http://builder.rubyforge.org)/
James.