[Twisted-web] how to make output file include xml declaration in nevow web framework?

Jean-Paul Calderone exarkun at divmod.com
Mon Oct 13 21:54:43 EDT 2008


On Tue, 14 Oct 2008 09:39:21 +0800, Boern <cayson.z at gmail.com> wrote:
>Hi,all:
>   I am a newbie for nevow and now I write a wap page ,but the output file
>don`t include xml declaration ,eg: <?xml version="1.0" encoding="utf-8"?> .
>how to resolve ?   my wap browser need it to  parse the xml context and how
>I make output file include xml declaration?

Please don't repost the same question twice in one day.  Don't repost the
same question at all, actually.  If you don't get a response, you can try
adding more details to your question, but just posting the same text more
than once will just annoy people.

The only XML Nevow accepts as input is XHTML, plus some tags defined by
the Nevow XML namespace.  It doesn't know anything about WAP.  If you want
to include a specific XML declaration in the output, then that's what you
should do - include it in the output, not in the XHTML template file.  There
are a lot of ways to do this.  The best depends on how you're generating
output.  One way is with a nevow.tags.xml tag.  Another is to write a string
to the request.

Jean-Paul



More information about the Twisted-web mailing list