inconsistency in calling to_xml on STI returning <record>

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,