Files
web2py/applications/examples/views/generic.xml
Massimo Di Pierro e9fadbc40b added tagcloud
2011-11-23 01:14:19 -06:00

16 lines
404 B
XML

{{
###
# response._vars contains the dictionary returned by thecontroller action
###
try:
from gluon.serializers import xml
response.write(xml(response._vars), escape=False)
response.headers['Content-Type'] = 'text/xml'
except (TypeError, ValueError):
raise HTTP(405, 'XML serialization error')
except ImportError:
raise HTTP(405, 'XML not available')
except:
raise HTTP(405, 'XML error')
}}