This content has been marked as final. Show 5 replies
I did a trace on the node of the rss feed you wish to Parse, this is a sample of what it returns
<item><guid isPermaLink="false">1159773714</guid><title>Current Conditions - 65.2F / 18.4C | Scattered Clouds - 12:21 AM PDT Oct. 2</title><link> http://www.wunderground.com/US/CA/Baldwin_Park.html</link><description>Temperature: 65.2&#176;F / 18.4&#176;C | Humidity: 77% | Pressure: 29.93in / 1013.4hPa | Conditions: Scattered Clouds | Wind Direction: East | Wind Speed: 0.0mph / 0.0km/h</description><pubDate>Mon, 2 Oct 2006 00:21:00 PDT</pubDate></item>
Current Conditions - 65.2F / 18.4C | Scattered Clouds - 12:21 AM PDT Oct. 2
I think your problem is, your trying to Parse node tags and text. I think your best bet is to drill down further into this node and only extract the actual data you want ie: <title> or <description> nodes.
Hope it helps
I prefer using XPATH expressions to simplify the Parsing process, the following code drills down directly to all TITLE nodes.
I would like to thank “The Feldkircher” for his/her help. Using his/her example I was able to parse out all the information I need from the rss weather feed.
Thank you again,
No Problem, Happy to help
And just for the record its an he/him/it
I would like to give something back that will possible help someone else. I know that there are several people that have asked how to put weather information into their movies. Now that I have figured it out with the help of “The Feldkircher”; I would like to help someone else. I have created a very basic example (that works with flash version 8) to help point other people in the correct direction. I have striped out all the fluff to make the code easier to follow. The source of the data is from the following rss feed:
an example of the text that will be parsed out is:
Temperature: 65.5°F | Humidity: 64% | Pressure: 29.94in | Conditions: Clear | Wind Direction: WSW | Wind Speed: 3.0mph
The parsing code will parse and format the date so it looks like the following:
Irwindale Speedway Weather
Temperature: 65.5 °F
Wind Speed: 3.0mph
Wind Direction: WSW
I hope this example will useful to other people