« Programmation PHP/Exemples/DomXml » : différence entre les versions

Contenu supprimé Contenu ajouté
Ligne 155 :
{// >((dom)node, (array)tab, (int)i) ((array)tab)>
if($next=$node->first_child()) // 1
{
do
{
switch($next->node_type()) // 2
{
case 3:
$tab['data']=$next->node_value();
break;
case 1:
Ligne 169 :
break;
}
}while($next=$next->next_sibling()); // 3
}
return $this->tab=$tab;
Ligne 179 :
 
</pre>
 
**#on teste si firstchild
**#on test le type de noeud
**#on passe au noeud suivant
 
=Application=