Try using @service.xml

@service.xml
def get_rows(table,start,end)
    rows = db(db[table].id>0).select(limitby=(start,end))
    return rows

http://127.0.0.1:8000/app/default/call/xml/get_rows?table=things&start=0&end=100


On Dec 9, 5:06 am, Mikko <[email protected]> wrote:
> Hi,
>
> Any sniplet to export table as xml (would be nice include easy
> customization...)
> Old
> def export_xml(rows):
>     idx=range(len(rows.colnames))
>     colnames=[item.replace('.','_') for item in rows.colnames]
>     records=[]
>     for row in rows.response: records.append(TAG['record'](*[TAG
> [colnames[i]](row[i]) for i in idx]))
>
> aviously doesnt work
>
> Mikko
> -

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to