I'm trying to render XML to the client in my Rails 3 application.
There's a section called Rendering XML in this documentation:

http://apidock.com/rails/ActionController/Base/render

I'm trying to follow the example like so:

render :xml => {:name => "David"}

But that produces the following:

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <name>David</name>
</hash>

Such a response would be invalid for the API I'm trying to use due to
the presence of the <hash> tags.  How do I only render the following:

<name>David</name>

Ultimately, I'm trying to render something like this:

<Person><Name>David</Name></Person>

Also, in the API I'm trying to use, the tags are case sensitive
(meaning I must output Person and not person).  Thanks for any help!

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to