i use php and simplexml, my probleme is "to add a attribute with for" my code is:
for($i=1;$i<=$compteur;$i++)
{
$jeu->situation->question->choix->addChild('rep',"
".$rep[$i]."
");
$jeu->situation->question->choix->rep->addAttribute('val',$i);
}
Result:
<choix>
<rep val="1">
</rep>
<rep>
</rep>
</choix>
he add just in a first !!!