Bonjour,
j ai un probleme lorsque j essaye de fixer un attribut comme ID a mes balises xml ... le but final est de pouvoir utiliser la fonction DOMDocument::GetElementById(id).
Donc voila j ai mon xml
mais pour pouvoir utiliser la fonction getElementById il faut d apres ce que j ai lu que je fixe un ID a mes balises moto sur un des attributs de la balise ... je choisit donc de prendre l attribut nom comme ID<!DOCTYPE magasin SYSTEM "magasin.dtd">
<xml version="1.0" encoding="utf-8">
<magasin>
<moto nom="GSXR1000" cylindree="999" />
<moto nom="GSXR1100" cylindree="1100" />
</magasin>
</magasin>
</xml>
donc je fais le fichier magasin.dtd suivant :
cependant j ai pas mal d erreurs ....<!ATTLIST moto nom ID #REQUIRED>
qu elle solution y a t il pôur mon pb ???
merci
Partager