Forums / General / XML header ( <? xml version="1.0"> )
Anatoly Gubanov
Wednesday 08 November 2006 1:38:43 pm
I need to generate one of my content in pure xml. I have made contetn-type for given path to 'text/xml' ( by HTTPHeaderSettings section in site.ini ) and created pagelayot.tpl template like:
<? xml version="1.0" encoding="windows-1251" ?> <main_tag> <aaa> ............ </aaa> </main_tag>
In result I have XML content but not valid because before XML header <? xml version="1.0"?>appears some space symbols which make this XML file not valid. XML content should start with this header without any spaces or something anything. How can I remove this spaces? Or how correctly put XML header into pure XML content?
Ćukasz Serwatka
Thursday 09 November 2006 11:16:38 pm
Take a look on layout.ini there you can set your custom header like text/xml. Then you need to define new template (your_design\templates\customtpl.tpl) and acccess layout module like http://www.example.com/layout/set/<your_layout_name>/content/view/full/2
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog