Hi, When calling to_xml on STI that returns heterogeneous type of records, each record is contained in <record> node. For example, if I have Account with subclasses EmailAccount and PhoneAccount, Account.find(:all).to_xml gives me: <record> <emailaddress1 ...> </record> <record> <phonenumber1..> </record> When calling to_xml on homogeneous type of records, each record is contained in the node with the type. For example, Account.find(:all, :conditions=>{:type => ''PhoneAccount''}) <phone_account> <phonenumber1...> </phone_account> I feel this makes writing test and client-side parsing difficult. I did some search and didn''t find anything solutions (except a trac ticket opened over a year ago with status open). I also feel this is probably a often-encountered issue and have some pragmatic solution. Any suggestion is appreciated. Thanks, -- Zhao --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---