[FLOW3-general] .xml output

mario chiari m at mariochiari.net
Fri Sep 28 16:46:03 CEST 2012


Hi Christian, 

thanks for the reply.
I had already done as you suggest, but it does not work, in the
following sense:

I have defined an xmlAction controller, and both xml.xml and xml.html
fluid templates (and layouts too). Client side I get the .xml code I
wish, but still Firefox read it as it were a .html source and does not
show anything.

I checked the response headers:
---------------
Date: Fri, 28 Sep 2012 14:23:41 GMT
Server: Apache/2.2.17 (Fedora)
X-Powered-By: PHP/5.3.8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Set-Cookie: FLOW3=00cnhrg94sbe709u75c8227b04; path=/; HttpOnly
X-FLOW3-Powered: FLOW3/1.1
Content-Length: 474
Connection: close
Content-Type: text/html; charset=UTF-8

200 OK
----------------------

Should Content-Type: be text/xml? How do I force to be so?
I tried to add 
protected $supportedMediaTypes = array('text/xml', 'text/html');
but it does not seem to fix the output. 

I appreciate your help
 
mario




On Fri, 2012-09-28 at 13:17 +0200, "Christian Müller (FLOW3 Team)"
wrote:
> Actually what should work:
> 
> Lets say you have some listAction that renders the data you need in HTML 
> you also have a ListAction.html Fluid template for that action, now in 
> the same directory you define a ListAction.xml Fluid template (rendering 
> the xml as you want it) and call the same listAction with an .xml 
> ending. Should give you back the xml.
> 
> Cheers,
> Christian





More information about the FLOW3-general mailing list