GetElementById dom xml php
tried
-
avion-f16 Messages postés 19268 Date d'inscription Statut Contributeur Dernière intervention -
avion-f16 Messages postés 19268 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
j'ai un problème avec le getElementById,voici la partie de mon code qui pose problème
$dom = new DomDocument();
$dom->load('fichier.xml');
$racine =$dom->documentElement;
$neoud=$racine->appendChild($dom->createElement("graph","5"));
$noeud->setAttribute("gid","2008");
$noeud->setIdAttribute("gid",true);
$id = $dom->getElementById("gid");
$dom->save('fichier_test.xml');
quand je veux tester $id,ben c'est quoi qu'il arrive null(ou vide),bref,pourtant dans mon fichier xml de sortie tout se génere parfaitement.
pourriez vous m'eclairer?
Merci d'avance!
j'ai un problème avec le getElementById,voici la partie de mon code qui pose problème
$dom = new DomDocument();
$dom->load('fichier.xml');
$racine =$dom->documentElement;
$neoud=$racine->appendChild($dom->createElement("graph","5"));
$noeud->setAttribute("gid","2008");
$noeud->setIdAttribute("gid",true);
$id = $dom->getElementById("gid");
$dom->save('fichier_test.xml');
quand je veux tester $id,ben c'est quoi qu'il arrive null(ou vide),bref,pourtant dans mon fichier xml de sortie tout se génere parfaitement.
pourriez vous m'eclairer?
Merci d'avance!
A voir également:
- GetElementById dom xml php
- Telecharger xml - Télécharger - Édition & Programmation
- Expert php - Télécharger - Langages
- Office xml handler - Télécharger - Traitement de texte
- Driveimage xml - Télécharger - Sauvegarde
- Easy php - Télécharger - Divers Web & Internet