afficher les attribut d'un xml

afficher les attribut d'un xml - XML/XSL - Programmation

Marsh Posté le 18-04-2009 à 12:34:37    

bonjour a tous  
 
Je possede un fichier xml qui se presente comme ceci:  
 

Code :
  1. <menu playlistTitle="Player">
  2. <item index = "0" Artist = "trucmuche" Title = "bidule" url = "url_fichier.mp3" />
  3. </menu>


 
Je souhaiterais pouvoir recuperer les attributs index, Artist et Title que comprend ce fichier afin de l'afficher sur une page php.  
 
Si vous pouviez m'aider se serais tres sympa, le php etant encore tres flou pour moi, faut bien commencer un jour...    
 
Merci d'avance et au plaisir de vous lire...

Reply

Marsh Posté le 18-04-2009 à 12:34:37   

Reply

Marsh Posté le 18-04-2009 à 13:41:01    

http://fr.php.net/simplexml


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box, and replicate and expand beyond their wildest dreams by throwing away the limits imposed by overbearing genetic r
Reply

Marsh Posté le 20-04-2009 à 12:23:11    

merci Masklinn pour cette judicieuse réponse mais mon probleme est que mon site est en php4 or cette fonction n'est disponible que sous php5.
Si quelqu'un a une autre suggestion, je suis preneur.
Merci d'avance.

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed