bonjour a tous,
j'ai un fichier flash qui li des test dans mon fichier xml et les affiche
jusque la no probleme
je vient de changer la structure de mon fichier xml ( car je souhaite le rendre dynamique avec du simple xml et dom)
bref les ennuie commence
plus rien de marche
pour faire simple
voici mon xml d'avant
et mon as d'avant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 <?xml version="1.0" encoding="ISO-8859-1"?> <root> <produit> <picture1>httpuit/img/produit1.jpg</picture1> <titre1>Gilet Airbag Neck DPS SPIDI</titre1> <price1>309,90</price1> <encart1>EXCLU</encart1> <carac1>Gileir du S au 3XL</carac1> <picture2>http:xml/produit/img/produit2.jpg</picture2> <titre2>Eight Jacket RACER </titre2> <price2>339,00</price2> <encart2>PROMO</encart2> <carac2>blouson cuir homme </carac2> </produit> </root>
et mon nouveau xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 var xmlLoader:URLLoader = new URLLoader(); var xmlData:XML = new XML(); xmlLoader.addEventListener(Event.COMPLETE, LoadXML); xmlLoader.load(new URLRequest('http://www.senimedia.com/ds/maxxess/bordeaux/xml/produit/produit.xml')); function LoadXML(e:Event):void { xmlData = new XML(e.target.data); for(var i:int=0;i<xmlData.produit.length();i++) { loadMedia(xmlData.produit[i].picture22); titre.titre.text=xmlData.produit[i].titre22; price.price.text=xmlData.produit[i].price22+' '; encart.encart.text=xmlData.produit[i].encart22; carac.carac.text=xmlData.produit[i].carac22; } } ......
quelqu'un peut m'aider a refaire mon fichier as??????
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 <?xml version="1.0" encoding="ISO-8859-1"?> <produits> <num id="1"> <magasin>bordeaux</magasin> <rayon>rayon casque</rayon> <produit>Produit n°1</produit> <picture>grand.jpg</picture> <titre>Lady Ella BERING ezrgzer gzer gze rg zae</titre> <price>119,00</price> <encart>PROMO</encart> <carac>1 a 6</carac> </num> <num id="2"> <magasin>bordeaux</magasin> <rayon>rayon casque</rayon> <produit>Produit n°2</produit> <picture>produit2.jpg</picture> <titre>Eight Jacket RACER </titre> <price>290,00</price> <encart>velo</encart> <carac> L au XXL</carac> </num> </produits>
merci





Répondre avec citation



Partager