RE: [Zope] XML/headers
Use XMLDocument. http://www.zope.org/Products/XMLDocument -Michel
-----Original Message----- From: Ulf Engstrøm [mailto:b2blink@hotmail.com] Sent: Wednesday, January 19, 2000 11:23 AM To: zope@zope.org Subject: [Zope] XML/headers
Hello...:) I've made a little py-script in Zope that is to return:
<?xml version="1.0"?> My xml stuff </xml>
However, when I have a regular return statement in the py, I'll get a <html><head></head> <?xml version="1.0"?> .. </xml> in return. Can I get rid of the <html> stuff at the first row? Also, can I edit the headers sent by the server in return, they shouldn't say type="text/html" since that's not what it is. Hope someone can help me, would really be apprechiated :)
Best regards Ulf Engstrøm ulf.engstrom@b2b-link.com ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Michel Pelletier wrote:
Use XMLDocument.
Um, but possibly he doesn't want to (while I definitely recommend XMLDocument) and he asked how to manually set the return header. Wouldn't Zope stay away from the returned text if it isn't set to text/html? Anyway, some minor experimenting seems to indicate that this DTML method may be a step into the right direction: <dtml-call "RESPONSE.setHeader('Content-Type', 'text/xml')"> <foo> <bar>foo</bar> </foo> Regards, Martijn
participants (2)
-
Martijn Faassen -
Michel Pelletier