XML/ PHP-Problème pour l'insertion d'un noeud
Résolu/Fermé
rafale69300
Messages postés
84
Date d'inscription
vendredi 31 octobre 2008
Statut
Membre
Dernière intervention
15 juin 2010
-
24 mars 2010 à 11:15
rafale69300 Messages postés 84 Date d'inscription vendredi 31 octobre 2008 Statut Membre Dernière intervention 15 juin 2010 - 24 mars 2010 à 11:46
rafale69300 Messages postés 84 Date d'inscription vendredi 31 octobre 2008 Statut Membre Dernière intervention 15 juin 2010 - 24 mars 2010 à 11:46
A voir également:
- XML/ PHP-Problème pour l'insertion d'un noeud
- Xml download - Télécharger - Édition & Programmation
- Insertion sommaire word - Guide
- Insertion liste déroulante excel - Guide
- Touche insertion clavier - Guide
- Easy php - Télécharger - Divers Web & Internet
1 réponse
rafale69300
Messages postés
84
Date d'inscription
vendredi 31 octobre 2008
Statut
Membre
Dernière intervention
15 juin 2010
2
24 mars 2010 à 11:46
24 mars 2010 à 11:46
J'ai trouvé mon erreur voici le nouveau code :
$path = 'extension/'.$extension.'/translations/'.$language.'/translation.ts'; $dom = new DomDocument; $dom->load($path); $nouveauMessage = $dom->createElement('message'); $nouveauMessage->appendChild($dom->createElement('source', $source)); $nouveauMessage->appendChild($dom->createElement('translation', $translation)); $context01 = $dom->getElementsByTagName('context')->item($context); $context01->appendChild($nouveauMessage); $dom->save($path);