Hema Gonaboina wrote:
> Frederick Cheung wrote:
>> On Nov 28, 7:09�am, "hema gonaboina" <[EMAIL PROTECTED]> wrote:
>>> � � � � � � � � � � � � � � � � 100
>>> � � � � � � � � � � � � � � � � � <city> unknown </city>
>>> � � � � � � � � </insert>
>>> <street1> 1-122/76 </street1>
>>> � � � � � � � � � � � �.
>>> � But we are receiving the xml as HashWithIndifferentAccess
>>> � params[:xml].class => �HashWithIndifferentAccess
>>>
>> Rails parses the xml for you (into a hash). you can get the raw body
>> of the request if you want (@request.body)
>>
>> Fred
>
> Thank You Fred for your response
>
> But, I didn't get you.. Can U explain me with example.. I need the xml
> only but i am receiving object of class HashWithIndifferentAccess.. so i
> am trying to convert into pure Hash and then to xml..
> How to receive the value as xml ?
> If it works no need of conversion..
> How to use the @request.body ?
I worked on it..
and found that it is collecting as hashes with arrays in between
in out case it is as {"root" => {"insert"=>
[{"name"=>"xyz","address"=>[{"city"=>"city","state"=>"state"....}],"job"=>"developer",....},{"name"=>"pqr","address"=>[{},{}...],..}]}}
That is it takes arrays between the hashes..
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---