If I do
rows = db(...).select(db.table.ALL).as_list()
from gluon.serializers import xml
xmlrows = XML(xml(rows, quote=False))
import gluon.contenttype
response.headers['Content-Type'] = gluon.contenttype.contenttype('.xml')
return dict(xmlrows=xmlrows)
I will get xml looking like this :
<document>
<rows>
<item>
<db_field1_name>10</db_field1_name>
<db_field2_name>10</db_field2_name>
...
</item>
</rows>
Passing rname as xml tag is not possible...
So, does web2py will handle it out of the box or we will have to render a
custom xml...
I am playing with Excel Web Query right now and realize that I need a
custom xml rendering function it I want to make sure users don't mess with
db fields names...
It would be nice if we could render a table in a way basic Excel Web Query
handle the xml properly and use rname as columns headers...
I will make some test about xml...
Richard
On Mon, Jan 27, 2014 at 3:17 PM, Niphlod <[email protected]> wrote:
> Can you elaborate ?
>
>
> On Monday, January 27, 2014 8:34:31 PM UTC+1, Richard wrote:
>>
>> Hello,
>>
>> What's going to happen with rname in xml?
>>
>> Richard
>>
> --
> 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/groups/opt_out.
>
--
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/groups/opt_out.