Afficher xml dans HTML

Résolu/Fermé
supupoff Messages postés 310 Date d'inscription dimanche 27 novembre 2011 Statut Membre Dernière intervention 8 janvier 2021 - Modifié par supupoff le 12/01/2013 à 21:21
supupoff Messages postés 310 Date d'inscription dimanche 27 novembre 2011 Statut Membre Dernière intervention 8 janvier 2021 - 16 janv. 2013 à 22:16
Bonsoir,


je veux afficher XML en html j'ai fait recours a c tuto http://www.lehtml.com/xml/xml_html.html

mais rien il m affiche que les colonnes de tableau et pas le resultat volus alors que fichier xml contient :

Code XML ::

<xml version="1.0" encoding="iso-8859-1"?><rss version="2.0"><magazin>
<titre>Magazine</titre>
<item>
<nom>Produit A</nom>
<prix>1000</prix>
<type>Informatique</type>
<description>Ordinateur Portable HP Pavillant 7200</description>
</item>
<item>
<nom>Produit B</nom>
<prix>1000</prix>
<type>Informatique</type>
<description>Scanner Hp Deskhet</description>
</item>
</magazin>

Code HTML :

<html>
<body>

<xml id="fichierxml" src="magazin.xml"></xml>
<table border="1" datasrc="#fichierxml">
<tr>
<td>Produits</td>
<td>Prix dt</td>
<td>Type </td>
<td>Description</td>
</tr>
<tr>
<td><span datafld="nom"></span></td>
<td><span datafld="prix"></span></td>
<td> <span datafld="type"></td>
<td> <span datafld="description"></td>
</tr>
</table>

</body>
</html>

3 réponses

supupoff Messages postés 310 Date d'inscription dimanche 27 novembre 2011 Statut Membre Dernière intervention 8 janvier 2021 34
Modifié par noctambule28 le 18/01/2013 à 00:41
Up UP
0