Código :
<noticias> <noticia fecha="14/04/2005"> <titulo>texto</titulo> <mensaje>textomensaje> <image>imagen.jpg</image> <mensajedes>texto del mensaje desarrollado</mensajedes> </noticia>
hasta ahí bien, pero luego en actionscript hago lo siguiente:
Código :
var fecha:String; var titulo:String; var mensaje:String; var mensajedes:String; var imagen:String; fecha = noticias_xml.firstChild.childNodes[_indice].attributes.fecha; titulo = noticias_xml.firstChild.childNodes[_indice].firstChild.firstChild.nodeValue; mensaje = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.firstChild.nodeValue mensajedes = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.firstChild.nodeValue imagen = noticias_xml.firstChild.childNodes[_indice].lastChild.firstChild.nodeValue mensaje_txt.htmlText = ""; mensaje_txt.htmlText += "<p align='center'><font color='#0066FF' size='12' ><b>" +titulo+ "</b></font></p>"; mensaje_txt.htmlText += "<p><font size='8' face='David Sans Condensed'>" + mensajedes + "</font>"; mensaje_txt.htmlText += "<font color='#666666' size='8'>Publicado: " + fecha + "</font></p>"; pantalla_mc.loadMovie(imagen);
El error lo tengo en que cuando le digo que me muestre lo que hay en "mensajedes" me muestra lo que hay en la variable "mensaje" y no se si he hecho mal estas lineas:
mensaje = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.firstChild.nodeValue
mensajedes = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.firstChild.nodeValue
me podeis decir si se está leyendo mal el XML?
GRACIAS
