This should work:

controller:
data = db(db.table.id>0).select()
return dict(data=data)

view:
{{=data.xml()}}


On Monday, May 18, 2015 at 1:52:31 PM UTC-4, Mirek Zvolský wrote:
>
> I don't know how to write xml views.
>
> Basic content: {{from gluon.serializers import 
> xml}}{{=XML(xml(response._vars,quote=False))}}
> is not good for me, because
> just a wrapper like <document>...</document> is Ok,
> but the content which are rows from db().select() - and xml tags for the 
> single rows are escaped: &lt.item&gt.&lt.name&gt. instead of <item><name>
>
> Can I find an example or description of the xml (or of the json) view 
> somewhere?
>
> Thanks...
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to