473,322 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

XML into Flash

AutumnsDecay
170 100+
Hey there.

I have been given an XML document and have been asked to create a Flash object that uses the variables in the XML document to generate the output.

The project is for a weather data feed which is created by the weather network (Canada). They have provided an XML file and a set of icons to display weather it's snowing, raining, sunny, etc.

Here is what the tags look like:

Expand|Select|Wrap|Line Numbers
  1. <PERIOD ID="2" DATE="04/01/2009 18:00" NAME_EN="This afternoon" ICON="a" FORECAST_TEXT_EN="Isolated showers" TEMPERATURE="10" POP="90" />
As you can see it gives the ICON name (ICON="a") and a bunch of other information in the tag. I need to be able to have Flash grab the info in that tag (string) and generate it. The XML is to be stored remotely on the weather network's server, which will be updated every 6 hours, according to our rep.

We have four cities in the XML document (as we have four locations of business). We need to be able to tell Flash which location it is currently, hard-coded.

Here is the code for a complete location:

Expand|Select|Wrap|Line Numbers
  1. <SITE NAME_EN="Kingston" PROV_EN="Ontario" COUNTRY_EN="Canada" LOCATIONID="CAON0349">
  2.         <OBS DATE="04/01/2009 08:00" ICON="b" FORECAST_TEXT_EN="Partly cloudy" TEMPERATURE="6" WIND_CHILL="N/A" WIND_SPEED="13" WIND_DIR="SE" />
  3.         <PERIOD ID="2" DATE="04/01/2009 18:00" NAME_EN="This afternoon" ICON="r" FORECAST_TEXT_EN="Light rain" TEMPERATURE="6" POP="90" />
  4.         <PERIOD ID="3" DATE="04/02/2009 00:00" NAME_EN="This evening" ICON="an" FORECAST_TEXT_EN="Scattered showers" TEMPERATURE="5" POP="90" />
  5.         <PERIOD ID="4" DATE="04/02/2009 06:00" NAME_EN="Tonight" ICON="an" FORECAST_TEXT_EN="Isolated showers" TEMPERATURE="2" POP="40" />
  6.         <PERIOD ID="5" DATE="04/02/2009 12:00" NAME_EN="Thursday morning" ICON="h" FORECAST_TEXT_EN="Mainly sunny" TEMPERATURE="4" POP="0" />
  7.         <WEEKDAY ID="2" DATE="04/02/2009 12:00" NAME_EN="Thursday, Apr  2" ICON="h" FORECAST_TEXT_EN="Mainly sunny" HIGH_TEMP="9" LOW_TEMP="2" />
  8.         <WEEKDAY ID="3" DATE="04/03/2009 12:00" NAME_EN="Friday, Apr  3" ICON="r" FORECAST_TEXT_EN="Light rain" HIGH_TEMP="11" LOW_TEMP="7" />
  9.         <WEEKDAY ID="4" DATE="04/04/2009 12:00" NAME_EN="Saturday, Apr  4" ICON="r" FORECAST_TEXT_EN="Cloudy with showers" HIGH_TEMP="9" LOW_TEMP="3" />
  10.         <WEEKDAY ID="5" DATE="04/05/2009 12:00" NAME_EN="Sunday, Apr  5" ICON="h" FORECAST_TEXT_EN="Sunny with cloudy periods" HIGH_TEMP="7" LOW_TEMP="2" />
  11.         <WEEKDAY ID="6" DATE="04/06/2009 12:00" NAME_EN="Monday, Apr  6" ICON="r" FORECAST_TEXT_EN="Light rain" HIGH_TEMP="7" LOW_TEMP="3" />
  12.     </SITE>
  13.  
As you can see it's all done by location ID. How would I hard-code that into flash in order to tell it which stats to look at?

Thanks in advance for any help I may receive!
Apr 1 '09 #1
0 1762

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes...
8
by: Ben Bartsch | last post by:
Looking for opinions on the use of Flash with ASP.NET. Has anyone here seen or conducted any implementations of Flash that are actually useful or otherwise complement ASP.NET?
4
by: vivek | last post by:
I am new to flash and want someone to guide me, Is it possible to create a UI entirely in Flash and that will inetract with C# components (backend) and these components will in return interact...
1
by: dscriv | last post by:
Hello, I have Netscape 8.0.4 (in Firefox mode) and Flash 8.0.24.0. I also have IE and Firefox installed. If I go to this page, which contains a Flash detection movie:...
115
by: post2google | last post by:
I was thinking about where to go for lunch the other day, so I went to hardees.com to see what the menu looked like these days. What comes up is a big note that my flash version is not new enough...
10
by: Steve Cook | last post by:
Hi, I have an upload application written in PHP and Flash. The PHP page gets the file information via $_POST. Moreover, the user never actually visits the PHP page, rather Flash sends the...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
1
by: critchey1 | last post by:
Hey everyone, i've been playing around with trying to get some scripts to work with detecting whether flash player is installed on your computer or not. I found a flash detection kit on the adobe...
2
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.