# XML version of a Rails-generated list function

**URL:** <https://www.ruby-forum.com/t/xml-version-of-a-rails-generated-list-function/112903>\
**Category:** Rails\
**Created:** [August 24, 2007, 10:47am UTC](https://www.ruby-forum.com/t/xml-version-of-a-rails-generated-list-function/112903 "2007-08-24T10:47:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gers32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ed8c4c/32.png) [@gers32](https://www.ruby-forum.com/u/gers32)\
**Post date:** [August 24, 2007, 10:47am UTC](https://www.ruby-forum.com/t/xml-version-of-a-rails-generated-list-function/112903/1 "2007-08-24T10:47:12Z")

</div>

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.
