Hi, I''m new to Ruby & using ROR as a web service. I''m returning XML using statement: @persons = Person.find(:all) render :xml => persons.to_xml() Now, this returns xml fine without any issues. However, it does not return the number of records. Lets say there are 2 records returned by the query as shown below: <?xml version="1.0" encoding="UTF-8"?> <persons> <person> <fname>Vick</fname> </person> <person> <fname>John</fname> </person> </persons> Now, I need output xml as shown below which will include count as well: <?xml version="1.0" encoding="UTF-8"?> <persons> <totalcount>2</totalcount> <person> <fname>Vick</fname> </person> <person> <fname>John</fname> </person> </persons> Can anyone help me out??? Thanks in Advance! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---