Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/07/2005, 12:59
Avatar de radarcba
radarcba
 
Fecha de Ingreso: mayo-2005
Ubicación: ureleando
Mensajes: 505
Antigüedad: 19 años, 6 meses
Puntos: 3
Leer un Archivo XML con Flash

Hola de nuevo.
Tengo un archivo xml con este formato:

<?xml version="1.0"?>
<DATA><ACTION><action_type>open</action_type><action_unique>yes</action_unique><action_ip>201.252.65.146</action_ip><campaign_id>1778</campaign_id><link_id>0</link_id><unique_identifier></unique_identifier><action_date>5/28/2005 11:39:00 AM</action_date></ACTION><ACTION><action_type>open</action_type><action_unique>yes</action_unique><action_ip>201.252.92.232</action_ip><campaign_id>1778</campaign_id><link_id>0</link_id><unique_identifier></unique_identifier><action_date>5/25/2005 9:15:00 AM</action_date></ACTION><ACTION><action_type>click</action_type><action_unique>yes</action_unique><action_ip>200.117.172.44</action_ip><campaign_id>1778</campaign_id><link_id>3992</link_id><unique_identifier>[email protected] </unique_identifier><action_date>5/24/2005 7:57:00 PM</action_date></ACTION><ACTION><action_type>click</action_type><action_unique>no</action_unique><action_ip>200.117.172.44</action_ip><campaign_id>1778</campaign_id><link_id>3992</link_id><unique_identifier>[email protected] </unique_identifier><action_date>5/24/2005 7:58:00 PM</action_date></ACTION><ACTION><action_type>open</action_type><action_unique>no</action_unique><action_ip>200.117.172.44</action_ip><campaign_id>1778</campaign_id><link_id>0</link_id><unique_identifier>[email protected] </unique_identifier><action_date>5/24/2005 7:57:00 PM</action_date></ACTION><ACTION><action_type>open</action_type><action_unique>no</action_unique><action_ip>201.235.46.7</action_ip><campaign_id>1778</campaign_id><link_id>0</link_id><unique_identifier>[email protected] om.ar</unique_identifier><action_date>5/25/2005 8:42:00 AM</action_date></ACTION><ACTION><action_type>click</action_type><action_unique>yes</action_unique><action_ip>201.235.46.7</action_ip><campaign_id>1778</campaign_id><link_id>3992</link_id><unique_identifier>[email protected] om.ar</unique_identifier><action_date>5/25/2005 8:42:00 AM</action_date></ACTION><ACTION><action_type>click</action_type><action_unique>yes</action_unique><action_ip>209.58.78.21</action_ip><campaign_id>1778</campaign_id><link_id>3992</link_id><unique_identifier>[email protected] om</unique_identifier><action_date>5/26/2005 2:19:00 PM</action_date></ACTION><ACTION><action_type>open</action_type><action_unique>no</action_unique><action_ip>209.58.78.21</action_ip><campaign_id>1778</campaign_id><link_id>0</link_id><unique_identifier>[email protected] om</unique_identifier><action_date>5/26/2005 2:19:00 PM</action_date></ACTION><ACTION><action_type>click</action_type><action_unique>yes</action_unique><action_ip>200.45.221.60</action_ip><campaign_id>1778</campaign_id><link_id>3992</link_id><unique_identifier>[email protected]</unique_identifier><action_date>5/24/2005 8:07:00 AM</action_date></ACTION><ACTION><action_type>open</action_type><action_unique>no</action_unique><action_ip>200.45.221.60</action_ip><campaign_id>1778</campaign_id><link_id>0</link_id><unique_identifier>[email protected]</unique_identifier><action_date>5/24/2005 8:07:00 AM</action_date></ACTION><ACTION><action_type>open</action_type

etc etc, y necesitaria leerlo desde flash.

probe creando un nuevo objeto XML en flash y leerlo con este AS:
obj_xml.firstChild.childNodes[0].firstChild.nodeValue;
//Asigna al campo de destino el valor de la segunda rama, la #1
destino_txt.text = obj_xml.firstChild.childNodes[1].firstChild.nodeValue;
//Asigna al campo de cuerpo el valor de la tercera rama, la #2
cuerpo_txt.text = obj_xml.firstChild.childNodes[2].firstChild.nodeValue;
etc, etc

pero no logro hacerlo, si alguien me puede guiar o darme un link con un tuto se lo agradecería.
Otra opcion seria leerlo con php , pero no encuentro la manera de identificar las tags del xml.
Gracias.
__________________
Maldición va a ser un día hermoso... PR
Tetris, correo & TU IP

Última edición por radarcba; 22/07/2005 a las 13:03 Razón: enunciarlo de una mejor manera.