Just a sideshow. The latest "action.xml" trick can give almost same
effect as your example. :-)

def mycontroller():
  return {'hello':'World'}

then visit http://.../mycontroller.xml then you can get:

  <document><hello>World</hello></document>

On May29, 1:48pm, durga moganty <[email protected]> wrote:
> first one.
> def mycontroller():
>    xml="<hello>World</hello>"
>    response.headers['Content-Type']='text/xml'
>    return xml
>
>  i ll parse the xml data at client side.
>
> On Fri, May 29, 2009 at 11:15 AM, mdipierro <[email protected]> wrote:
>
> > Do you mean you want to return it as in
>
> > def mycontroller():
> >    xml="<hello>World</hello>"
> >    response.headers['Content-Type']='text/xml'
> >    return xml
>
> > or do you want to email it
>
> > def mycontroller():
> >    from gluon.tools import Mail
> >    mail=Mail()
> >    mail.server='....'
> >    mail.sender=''''
> >    mail.login='....'
> >    xml="<hello>World</hello>"
> >    mail.send(to='...',message=xml)
> >    return "done"
>
> > On May 29, 12:17 am, durga <[email protected]> wrote:
> > > i have xml data framed in my controller. now i would like to send it
> > > as response to client  without using view. can someone please let me
> > > know how to do it.
>
> > > thanks
> > > durga
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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