Brian,
Here is what I do to return a csv file:
....
request.response.set_content_type("text/csv")
request.response.set_header("content-disposition", "filename=%s.csv" %
filename)
return join(file,"\n")
The request variable is what is coming into your method from Quixote. The
set_content_type method is the key, where you would put "application/xml".
I use content-disposition to suggest a filename to the browser. The file
variable is an array of lines, join turns that array into string with
return-delimited lines.
How this helps!
Eric Floehr
Intellovations, LLC
http://www.intellovations.com
Brian St. Pierre said:
> How can I specify an alternative Content-Type to be returned from my
> scripts? I'd like to have one of my scripts return either RSS
> (application/xml) or a regular web page (text/html).
>
> Thanks.
>
> --
> Brian St. Pierre
> bstpierre @ bstpierre.org
> http://bstpierre.org/
>
> _______________________________________________
> Quixote-users mailing list
> Quixote-users@mems-exchange.org
> http://mail.mems-exchange.org/mailman/listinfo/quixote-users
>