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
<!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>
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

donc je fais le fichier magasin.dtd suivant :
<!ATTLIST moto nom ID #REQUIRED>
cependant j ai pas mal d erreurs ....

qu elle solution y a t il pôur mon pb ???

merci