I am outputting an XML file from TPL using iw_ostream as follows
[php]
<br>$xmlFileName = "xml/dates.xml"; <br>$CDATA_open='<!'.'[CDATA[';<br>$CDATA_close=']]'.'>';<br>
<iw_value name="$CDATA_open"/><iw_value name='event1.title'/><iw_value name="$CDATA_close"/>
<metadesc>
<iw_value name="$CDATA_open"/><iw_value name='presentation1.title'/><iw_value name="$CDATA_close"/>
<br><br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br><html> <br><head> <br> <title></title> <br> <link href="/css/styles.css" type="text/css" rel="stylesheet" /> <br><br> <link href="/css/unbranded.css" type="text/css" rel="stylesheet" /> <br> <link href="/css/style_template.css" type="text/css" rel="stylesheet" /> <br><br> <!--[if lte IE 6]> <br> <LINK href="/css/ie6.css" type="text/css" rel="stylesheet" media="screen" /> <br> <![endif]--> <br> <!--[if lte IE 7]> <br> <LINK href="/css/ie7.css" type="text/css" rel="stylesheet" media="screen" /> <br> <![endif]--> <br><br><br></head> <br><body> <br> <div id="page"> <br> <div id="v2_page_middle"> <br> <div id="v2_container_top"></div> <br> <div id="v2_container_middle" class="template"> <br> <div id="banner"> <br> <div id="logos"> <br> <a href="/index.aspx"><img alt="medlink" src="/images/menus/main/nml-logo_Global.jpg"/></a><br> </div> <br> </div> <br> <div id="v2_menu-top-container"> <br> <div id="v2_menu-top-left"></div> <br> <div id="menu-top" class="menu-template"> <br> <br> </div> <br> <div id="v2_menu-top-right"></div> <br> </div> <br> <br> <div id="content-template"> <br> <h1>Template Events List</h1> <br> <br> <p>The template events list has been generated correctly.</p> <br> </div> <br> </div> <br> <div id="v2_container_footer"></div> <br> </div> <br> </div> <br></body> <br></html> <br><br>
[/php]dates.xml is outputting fine will all nodes except xml declaration line ""
When I am coding iw_ostream as [php]
--
--[/php]I am getting error message that
"xml declaration should be the first line"
How can I get xml declaration in file outputting from iw_ostream ?
Thanks