Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/05/2010, 03:40
alexlitri
 
Fecha de Ingreso: marzo-2010
Mensajes: 3
Antigüedad: 14 años, 1 mes
Puntos: 0
Mostrar datos de un xml mediante Action Script

Hola mundo!

Recurro a vosotros por que llevo mas de 2 meses dando vuletas y empapandome foros y manuales, y no saco nada en claro en algo tan sencillo para algunos...

Pretendo mostrar datos de un xml de yahoo de meteorologia mediante action script, pero me lio mucho cuando asigno nobres a la caja de texto variable y esta se entiende con AScript.

Tan solo necesito que me enseñeis la luz de como mostrar datos por ej. el nombre de la ciudad que en este caso es tarragona la temperatura o el sunrise o sunset...

URL del yahoo: http://xml.weather.yahoo.com/forecastrss?p=SPXX0076&u=c

PD. Con el codigo lo mas sencillo posible me conformo porfavor, asi aprendo el mecanismo.

MUchas gracias un poquito de luz!!! please!

El xml es el siguiente:

<?xml version="1.0" encoding="UTF-8" ?>
- <channels>
- <rss version="2.0" xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
- <channel>
<title>Yahoo! Weather - Tarragona, SP</title>
<link>http://us.rd.yahoo.com/dailynews/rss/weather/Tarragona__SP/*http://weather.yahoo.com/forecast/SPXX0076_c.html</link>
<description>Yahoo! Weather for Tarragona, SP</description>
<language>en-us</language>
<lastBuildDate>Wed, 05 May 2010 8:30 am CEST</lastBuildDate>
<ttl>60</ttl>
<yweather:location city="Tarragona" region="" country="SP" />
<yweather:units temperature="C" distance="km" pressure="mb" speed="km/h" />
<yweather:wind chill="8" direction="260" speed="9.66" />
<yweather:atmosphere humidity="62" visibility="9.99" pressure="982.05" rising="1" />
<yweather:astronomy sunrise="6:48 am" sunset="8:56 pm" />
- <image>
<title>Yahoo! Weather</title>
<width>142</width>
<height>18</height>
<link>http://weather.yahoo.com</link>
<url>http://l.yimg.com/a/i/us/nws/th/main_142b.gif</url>
</image>
- <item>
<title>Conditions for Tarragona, SP at 8:30 am CEST</title>
<geo:lat>41.12</geo:lat>
<geo:long>1.25</geo:long>
<link>http://us.rd.yahoo.com/dailynews/rss/weather/Tarragona__SP/*http://weather.yahoo.com/forecast/SPXX0076_c.html</link>
<pubDate>Wed, 05 May 2010 8:30 am CEST</pubDate>
<yweather:condition text="Partly Cloudy" code="30" temp="9" date="Wed, 05 May 2010 8:30 am CEST" />
- <description>
- <![CDATA[ <img src="http://l.yimg.com/a/i/us/we/52/30.gif"/><br />
<b>Current Conditions:</b><br />
Partly Cloudy, 9 C<BR />
<BR /><b>Forecast:</b><BR />
Wed - AM Light Rain. High: 18 Low: 8<br />
Thu - Mostly Cloudy. High: 19 Low: 11<br />
<br />
<a href="http://us.rd.yahoo.com/dailynews/rss/weather/Tarragona__SP/*http://weather.yahoo.com/forecast/SPXX0076_c.html">Full Forecast at Yahoo! Weather</a><BR/><BR/>
(provided by <a href="http://www.weather.com" >The Weather Channel</a>)<br/>

]]>
</description>
<yweather:forecast day="Wed" date="5 May 2010" low="8" high="18" text="AM Light Rain" code="11" />
<yweather:forecast day="Thu" date="6 May 2010" low="11" high="19" text="Mostly Cloudy" code="28" />
<guid isPermaLink="false">SPXX0076_2010_05_05_8_30_CEST</guid>
</item>
</channel>
</rss>
- <!-- api1.weather.ch1.yahoo.com uncompressed/chunked Tue May 4 23:59:24 PDT 2010
-->
</channels>