On 10/1/05, Robert Leftwich <[EMAIL PROTECTED]> wrote:
>
> I'm attempting to return xml from TurboGears but the returned document always
> has a transitional html doctype and the element names are all upper case. I'm
> setting turbogearsfmt = 'xml' and cherrypy.response.headerMap["Content-Type"] 
> =
> "application/xml". How can I tell Kid to use an XML serialiser rather than the
> HTML serialiser?

it looks like there's no means to do so using built in mechanisms at
present. Which is not to say it's difficult, just more manual. This is
something that needs to be fixed soon.

from turbogears import view

class Foo:
    @turbogears.expose()
    def index(self):
        tclass = view.lookupTemplate("yourpackage.templates.templatename")
        t = tclass(yourdictionary)
        t.std = view.stdvars()
        return t.serialize(output="xml")

Kevin

--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Reply via email to