Código :
var cats_xml:XML = new XML();
cats_xml.ignoreWhite = true;
cats_xml.onLoad = function(loaded){
if (loaded){
pregunta.text = cats_xml.firstChild.childNodes[0].firstChild.nodeValue;
trace(pregunta.text);
}else{
trace("error");
}
}
Si necesito leer el 3er hijo, solo tengo que cambiar
Código :
childNodes[0]por
Código :
childNodes[2], si tengo una función que me entregue el indice a leer, cómo debe ser la función que reciba éste indice y lea el
Código :
childNodes[indice]?, he tratado de implementarla, pero solo recibo undefined como resultado... gracias por adelantado!
Satchie.
