Ciao ragazzi, ho un problemino. Genero da ASP un ogetto XML che mi passa un attributo e due nodi così (i dati li prelevo dal DB):
strXML="<notizie>"
while not objrecordset.eof
'-- creazione stringa di testo formattata come XML
'strXML=strXML & "<notizia data="""& disp_DateTime(objrecordset("news_data"),"yyyymmdd" ,"") &""" immagine="""& objrecordset("news_immagine") &""">"
strXML=strXML & "<notizia data="""& disp_DateTime(objrecordset("news_data"),"yyyymmdd" ,"") &""">"
strXML=strXML & "<titolo>"& objrecordset("news_eng_titolo")& "</titolo>"
strXML=strXML & "<testonews>"& objrecordset("news_eng_descrizione") &"
</testonews>"
strXML=strXML & "</notizia>"
objrecordset.movenext
wend
strXML=strXML & "</notizie>"
Adesso in XML da FLASH ho chiamato il tutto ma mi manca il pezzo per fareil ciclo.
Ecco il codice AS con il pezzo per il ciclo ke non mi va:
var nodes = this.firstChild.childNodes;
for(var i = 0; i < nodes.length; i++){
var data = this.firstChild.firstChild.attributes.data;
var titolo = this.firstChild.firstChild.firstChild;
var testonews = this.firstChild.firstChild.firstChild.nextSibling;
this.path.testo = "<font color='#7c4e4e' size='16'>NEWS WHISTLE</font>
";
this.path.testo += ""+t+ data +t1+"";
this.path.testo += ""+ b+titolo +b1+"
";
this.path.testo += ""+t+ testonews +t1+"";
}
Mi date una mano per cortesia. Grazie