XML version of a Rails-generated list function

For the purpose of calling from a Flex HTTPService, I need to create an XML version of the Rails-generated list() function. The original is:

  def list     @rv_wrk_medical_staff_pages, @rv_wrk_medical_staffs = paginate :rv_wrk_medical_staffs, :per_page => 10   end

I tried applying to_xml() to @rv_wrk_medical_staffs, but get the following error message:

"Not all elements respond to to_xml"

Thanks,

Chris.