my xml format must be below
<?xml version="1.0" encoding="iso-8859-1"?>
<content>
<pageText><![CDATA[
<b> NEWS 1 </b>
<br><font color="#D52D00"><b><a href="asfunction:_root.more_click_func,0">° read more</a></b></font><br><br>
<b> NEWS 2 </b>
<br><font color="#D52D00"><b><a href="asfunction:_root.more_click_func,1">° read more</a></b></font><br><br>
]]>
</pageText>
<link linkType="readMoreLink">
<item name="title"><![CDATA[
news header
]]></item>
<item name="linkText"><![CDATA[
NEWS 1
NEWS 1
NEWS 1
NEWS 1
NEWS 1
NEWS 1
NEWS 1
NEWS 1
NEWS 1
]]></item>
</link>
<link linkType="readMoreLink">
<item name="title"><![CDATA[
news header
]]></item>
<item name="linkText"><![CDATA[
NEWS 2
NEWS 2
NEWS 2
NEWS 2
NEWS 2
NEWS 2
NEWS 2
]]>
</item>
</link>
</content>
but in my mysqltoxml.php i cant do this. 🙁
my php is
<?php
$baglan=mysql_connect("localhost","deneme","123456");
$dbsec=mysql_select_db("deneme_tbb");
$sqlx="select * from news ";
$sorgux=mysql_query($sqlx);
$row=mysql_fetch_array($sorgux);
$num=mysql_num_rows($sorgux);
if ($num != 0)
{
$file= fopen("16461_main.xml", "w");
$_xml ="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n";
$_xml .="<content>\r\n";
for($i=0; $i<$num; $i++)
{
$_xml .= '<pageText><![CDATA[<font color="#8b0918"><b><font size="12">' . $row['header'] . '</font></b></font> <br><font color="#d52d00"><b><a href="asfunction:_root.more_click_func,' . ($i) . '">devami</a></b></font><br><br>]]></pageText>' . "\r\n";
$_xml .="<link linkType='readMoreLink'> \r\n";
$_xml .=" <item name='title'>";
$_xml .='<![CDATA['.$row[header].']]>';
$_xml .="</item>\r\n";
$_xml .=" <item name='linkText'>";
$_xml .='<![CDATA['.$row[news].']]>';
$_xml .="</item>\r\n";
$_xml .="</link> \r\n";
}
$_xml .="</content> \r\n";
fwrite($file, $_xml);
fclose($file);
}
?>