Hi All #controller: @users=User.find(:all,:conditions=>["id=12"]) @faxs=FaxService.find(:all,:conditions=>["user_id=12 "]) My view is generate like this: <?xml version="1.0" encoding="UTF-8"?> <users> <fax> <access_number_id type="integer">303</access_number_id> </fax> <fax> <access_number_id type="integer">302</access_number_id> </fax> <fax> <access_number_id type="integer">301</access_number_id> </fax> <fax> <access_number_id type="integer">305</access_number_id> </fax> <user> <country>US</country> <email>vannuys-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</email> <id type="integer">12</id> <mobile_phone>4087723792</mobile_phone> </user> </users> But i want like this #View .rxml <?xml version="1.0" encoding="UTF-8"?> <users> <user> <country>US</country> <email>vannuys-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</email> <id type="integer">12</id> <mobile_phone>4087723792</mobile_phone> <fax> < access_number_id type="integer">303</access_number_id> </fax> <fax> <access_number_id type="integer">302</access_number_id> </fax> <fax> <access_number_id type="integer">301</access_number_id> </fax> <fax> <access_number_id type="integer">305</access_number_id> </fax> </user> </users> can some one tell me how to generate xml file? -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---