fifth
18-12-2006, 08:50
Ciao a tutti. In un file php ho inserito la seguente struttura:
echo "<?xml version='1.0' encoding='UTF-8' ?>";
echo "<data id='test'>";
echo "<first_field id ='$first'>";
echo"<second_field id='$second' label='second'>";
echo"<third_field id='$third'>";
echo"<fourth_field value='2006'>";
echo "<result id='01'>'$res'</result>";
echo "<result id='02'>'$res2'</result>";
echo"</fourth_field >";
echo"</third_field>";
echo"</second_field >";
echo"</first_field>";
echo"</data >";
ma mi da l'errore :
Only one top level element is allowed in an XML document. Error processing resource
Come mai?
echo "<?xml version='1.0' encoding='UTF-8' ?>";
echo "<data id='test'>";
echo "<first_field id ='$first'>";
echo"<second_field id='$second' label='second'>";
echo"<third_field id='$third'>";
echo"<fourth_field value='2006'>";
echo "<result id='01'>'$res'</result>";
echo "<result id='02'>'$res2'</result>";
echo"</fourth_field >";
echo"</third_field>";
echo"</second_field >";
echo"</first_field>";
echo"</data >";
ma mi da l'errore :
Only one top level element is allowed in an XML document. Error processing resource
Come mai?