PDA

View Full Version : Reading special XML tags in Flex


efadrian
12-23-2008, 06:56 AM
Helllo, I am new in flex ...
I like to be able to read a rss file from :
http://weather.yahooapis.com/forecastrss?p=ENXX0004&u=c

The file contains some special tags with info that I like to read:

<yweather:location city="Tallinn" region="" country="EN"/>
<yweather:units temperature="C" distance="km" pressure="mb" speed="kph"/>
<yweather:wind chill="-5" direction="330" speed="28.97" />
<yweather:atmosphere humidity="70" visibility="9.99" pressure="0" rising="1" />
<yweather:astronomy sunrise="9:19 am" sunset="3:23 pm"/>


How can i read such tags and display them in a data grid?:eek:

thank you!
Adrian

corbo950
12-23-2008, 05:34 PM
Those are really weird i don't think they qualify as XML let alone RSS but i will try to play with them and see if i can get a data grid to read them

corbo950
12-23-2008, 06:10 PM
ya im not sure how you do that so i would just find a weather feed that uses standard RSS format and get the data from there otherwise would would have to use string functions like substring() to parse the data yourself and assemble it into your own xml object

drkstr
12-23-2008, 07:44 PM
Are you refering to the namespace tags (IE <yweather:wind chill="-4" direction="360" speed="12.87" />)?

If so, here is some information on working with namespaces in XML:

http://livedocs.adobe.com/flex/3/html/13_Working_with_XML_09.html


Best Regards,
~Aaron