Este es mi XML
Código PHP:
<?xml version="1.0" encoding="utf-8"?>
<gallery>
<image imgBigEx="img_big_01.jpg" thumEx="img_thum_01.jpg" />
<image imgBigEx="img_big_02.jpg" thumEx="img_thum_02.jpg" />
<image imgBigEx="img_big_03.jpg" thumEx="img_thum_03.jpg" />
<!-- THUMBNAIL -->
<image imgBigIn="img_big_01.jpg" thumIn="img_thum_01.jpg" />
<image imgBigIn="img_big_02.jpg" thumIn="img_thum_02.jpg" />
<image imgBigIn="img_big_03.jpg" thumIn="img_thum_03.jpg" />
</gallery>
Código PHP:
var bigImg:Array = new Array();
var modelNum;
var whichImgBig;
var whichThum;
var whichGallery = "photoExterior";
var switchGallery;
var switchGalleryThum;
var whichModelBigEx;
var whichModelBigThumEx;
var whichModelBigIn;
var whichModelThumIn;
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success){
var allTheModels = myXML.firstChild.childNodes;
for (var i=0; i<allTheModels.length; i++) {
var modelNum = allTheModels.length;
vawhichModelBigEx = allTheModels[i].attributes.imgBigEx;
whichModelBigThumEx = allTheModels[i].attributes.thumEx;
whichModelBigIn = allTheModels[i].attributes.imgBigIn;
whichModelThumIn = allTheModels[i].attributes.thumIn;
//trace (modelNum)
trace(whichModelBigEx)
trace(whichModelBigThumEx)
trace(whichModelBigIn)
trace(whichModelThumIn)
if (success){
//trace("XML Fully Loaded")
}
}
}
myXML.load("gallery.xml");
The thing is that I want to trace all the element from my XML in other word all the children from my root and I don't know how to do it or what I'm doing wrong !
La cosa es que quiero que muestre todos mis elementos de mi XML, en otras palabras todos los children de mi root de mi XML i no se como hacerlo o no se que estoy haciendo mal, si hay un experto en el tema con objetos en XML lo apreciaria infinitamente.
Gracias.
A little help please !