Rails 1.2

Ok, I have no clue where to post this, so if I'm in the wrong forum, just tell me, and I'll take a hike.

That being said: I was looking at the rubyonrails.org weblog site, and was reading of the updates to Active Support.

One that caught my attention was the Hash.from_xml function... as I was talking it over with another programmer, I got to wondering, how would it deal with something like:

<listofnames>   <name>Bob</name>   <name>Jim</name>   <name>Frank</name> </listofnames>

The structure they showed seemed to imply that a hash would be created using the tag name as the key, and the information contained in the tag as the value. So if there are three tags named 'name', does you just get {:listofnames => {:name => "Frank"}}?

If there are multiple elements with the same name then rails will return those as an array:

$ script/console

>> xml = '<listofnames>    <name>Bob</name>    <name>Jim</name>    <name>Frank</name> </listofnames>' => "<listofnames>\n <name>Bob</name>\n <name>Jim</name>\n <name>Frank</name>\n</listofnames>" >> a = Hash.from_xml(xml) => {"listofnames"=>{"name"=>["Bob", "Jim", "Frank"]}}

James.