Добавить HTML-коды в XML-файл, используя PHP

У меня есть XML-файл (Scores.xml), который я использую коды PHP, чтобы добавить новые теги к нему ...

у меня есть тег с именем Header, который содержит HTML-код

<![CDATA[<tr><td colspan='7' id='headertd'>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img border='0' src='images/euro.png' />
&nbsp;&nbsp;&nbsp;&nbsp;
UEFA Euro 2012 Qualifications</td></tr>]]>

когда я пишу этот код в виде сценария pgp и отправляю все нормально в файл XML, кроме тега заголовка .... я получаю сообщение об ошибке в сценарии php, а код помещается в тег xml следующим образом:

&lt;![CDATA[&lt;tr&gt;&lt;td colspan='7' id='headertd'&gt;&#13;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#13;
&lt;img border='0' src='images/euro.png' /&gt;&#13;
&nbsp;&nbsp;&nbsp;&nbsp;&#13;
UEFA Euro 2012 Qualifications&lt;/td&gt;&lt;/tr&gt;]]&gt;

так вот получаю информацию Вонг в мой XML ... в любом случае я могу это исправить? и избежать преобразования этих кодов?

вот мой код php:

<?php
if (isset($_POST['submitted'])) {//If the user submitted the form, then add to the XML file
    //Load the scores XML file
    $scores = new DOMDocument();
    $scores -> load('../scores.xml');

    //Get the <Games> tag
    $games = $scores -> getElementsByTagName('Games');

    //Create the new <Game> tag (Could probably be done better by first placing everything in an array or something)
    $newGame = $scores -> createElement("Game");
    $newGame -> appendChild($scores -> createElement("Header", $_POST['header']));
    $newGame -> appendChild($scores -> createElement("Row", $_POST['row']));
    $newGame -> appendChild($scores -> createElement("Date", $_POST['date']));
    $newGame -> appendChild($scores -> createElement("Time", $_POST['time']));
    $newGame -> appendChild($scores -> createElement("HomeTeam", $_POST['hometeam']));
    $newGame -> appendChild($scores -> createElement("Score", $_POST['score']));
    $newGame -> appendChild($scores -> createElement("AwayTeam", $_POST['awayteam']));
    $newGame -> appendChild($scores -> createElement("Other", $_POST['other']));
    $newGame -> appendChild($scores -> createElement("InfoID", $_POST['infoid']));
    $newGame -> appendChild($scores -> createElement("InfoData", $_POST['infodata']));

    //Add the new <Game> tag under the <Games> tag
    $games -> item(0) -> appendChild($newGame);

    //Save again
    $scores -> save('../scores.xml');

    echo "New game added.";
}
?>

и этот php связан с формой, которая выглядит так:

<form id="form1" method="post" action="">
<table id="table2">

<tr><td>Header:</td> <td><textarea style=" color:#000;" name="header" cols="73" rows="6" > </textarea></td></tr>

<tr><td>Row:</td> <td><input id='textfield' type="text" size="70" name="row" value='A or B' onfocus="inputFocus(this)" onblur="inputBlur(this)"></td></tr>

<tr><td>Date:</td> <td><input id='textfield' type="text" size="70" name="date" value='Date and time of the match' onfocus="inputFocus(this)" onblur="inputBlur(this)"></td></tr>

<tr><td>Time:</td> <td><input id='textfield' type="text" size="70" name="time" value='Current time' onfocus="inputFocus(this)" onblur="inputBlur(this)"></td></tr>

<tr><td>HomeTeam:</td> <td><input id='textfield' type="text" size="70" name="hometeam" value='Home Team' onfocus="inputFocus(this)" onblur="inputBlur(this)"></td></tr>

<tr><td>Score:</td> <td><input id='textfield' type="text" size="70" name="score" value='Score' onfocus="inputFocus(this)" onblur="inputBlur(this)"></td><td>"3 - 2"</td></tr>

<tr><td>AwayTeam:</td> <td><input id='textfield' type="text" size="70" name="awayteam" value='Away Team' onfocus="inputFocus(this)" onblur="inputBlur(this)"></td></tr>

<tr><td>Other:</td> <td><input id='textfield' type="text" size="70" name="other" value='Additional Info' onfocus="inputFocus(this)" onblur="inputBlur(this)"></td></tr>

<tr><td>InfoID:</td> <td><input id='textfield' type="text" size="70" name="infoid" value='The ID of the Popup' onfocus="inputFocus(this)" onblur="inputBlur(this)" ></td><td></td></tr>

<tr><td>InfoData:</td> <td><textarea id='textfield' value='Data of the Popup' onfocus="inputFocus(this)" onblur="inputBlur(this)" name="infodata" cols="73" rows="6"></textarea></td><td>

<tr><td> </td><td><input type="submit" name="submitted" name="Add new row"></td><td> <td></td> 

</table>

 <style>
 BODY {font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; color:#333; font-size:11px;}
 #textfield {color:#888;}
 #table2 td, tr { padding-right:10px;}
 </style>

Ответы на вопрос(4)

Ваш ответ на вопрос