re

allora io ho fatto una cosa del genere a logica (è la prima volta che uso xml+flash)


Code:


filexml = "release.xml";


ApriXML();
function ApriXML () {
var mioxml = new XML();
var myarray = new Array();
mioxml.load(filexml);
mioxml.onLoad = ElaboraXML;
function ElaboraXML (success) {
if (mioxml.loaded) {



var myarray = mioxml.firstChild.nextSibling.childNodes;

trace ("Tot elementi = " + myarray.length);

for (var i=0;i<=myarray.length;i++){

if (myarray[i].nodeName == "value"){

trace("------------------")

trace(myarray[i].attributes.id)
trace(myarray[i].childNodes[1].childNodes.toString())
trace(myarray[i].childNodes[3].childNodes.toString())
trace(myarray[i].childNodes[5].childNodes.toString())
//trace("elemento ["+i+"] ------------------")
//trace(myarray[i])
}
var titolo = trace(myarray[i].childNodes[5].childNodes.toString());
titolo.text += myarray[i].childNodes[5].childNodes.toString()
}
}
;
}
;
}
;





solo che nel campo testo mi appare una cosa del genere

defined22/04/2005undefined13/04/2005undefined15/04/2005undefined06/04/2005undefined22/03/2005undefined21/03/2005undefined11/03/2005undefined11/03/2005undefined03/03/2005undefined02/03/2005undefined02/03/2005undefined24/02/2005undefined18/02/2005undefined15/02/2005undefined11/02/2005undefined09/02/2005undefined01/02/2005undefined28/01/2005undefined25/01/2005undefined25/01/2005undefined2

tutto su una sola linea
anche se pare riuscire a leggere dal xml

mentre nella finestrina output ora ho delle linee in più


Code:


Tot elementi = 361
undefined
------------------
Popotan 06
45AB1D9E
181.429.978
27/04/2005
27/04/2005
undefined
------------------
Battle Athletess 01v2
6AA7A5A2
353.016.053
22/04/2005
22/04/2005
undefined
------------------





la ripetizione credo di aver capito da cosa dipenda ma l'undefined no

e soprattutto al campo testo ho abilitato il multilinea ma non mi va a capo.