what I needed was knowing if
import xmlwitch
def get_xml():
xml = xmlwitch.Builder(version='1.0', encoding='utf-8')
with xml.feed(xmlns='http://www.w3.org/2005/Atom'):
xml.title('Example Feed')
xml.updated('2003-12-13T18:30:02Z')
#response.headers['Content-Type']='text/xml'
#return XML(str(xml),sanitize=True)
#return XML(str(xml)).xml()
return xml
if __name__ == '__main__':
print get_xml()
works if executed outside web2py (and returns actually what you want)....
On Tuesday, October 16, 2012 10:53:36 AM UTC+2, deepak wrote:
>
> xmlwitch?
>
> xmlwitch works on normal python script.
> Is there a way to return custom made xml from web2py controller.
> Can you please help me with some prototype?
>
> On Tuesday, 16 October 2012 13:36:30 UTC+5:30, Niphlod wrote:
>>
>> does that work on a normal python script ?
>>
>> On Tuesday, October 16, 2012 8:25:18 AM UTC+2, deepak wrote:
>>>
>>> any updates/help...
>>>
>>>
--