Solved

AS3/XML parse XML nodes with attributes

Posted on 2009-06-30
1
550 Views
Last Modified: 2013-11-11
Here is the XML section I am trying to load into several dynamic text fields within the Flash piece.  Problem:  I am not sure what to do with the syntax forming of the XML within the AS3 path structure.  It keep erring out.  Please look at my code for the Flash and the XML, which will not be able to be changed.

Within the code below I recieve:
1078: Label must be a simple identifier.
XML node I need to pull in from:
 

<fh:FlightHistory FlightHistoryId="163872441" DepartureDate="2009-06-30 09:00" ArrivalDate="2009-06-30 10:33" PublishedDepartureDate="2009-06-30 09:00" PublishedArrivalDate="2009-06-30 10:33" ScheduledGateDepartureDate="2009-06-30 09:00" EstimatedGateDepartureDate="2009-06-30 09:00" ActualGateDepartureDate="2009-06-30 08:56" ScheduledGateArrivalDate="2009-06-30 10:33" EstimatedGateArrivalDate="2009-06-30 10:21" ScheduledRunwayDepartureDate="2009-06-30 09:07" EstimatedRunwayDepartureDate="2009-06-30 09:06" ActualRunwayDepartureDate="2009-06-30 09:07" ScheduledRunwayArrivalDate="2009-06-30 10:19" EstimatedRunwayArrivalDate="2009-06-30 10:27" FlightNumber="2795" StatusCode="A" Status="Active" CreatorCode="O" ScheduledAirTime="72" ScheduledBlockTime="93" DepartureAirportTimeZoneOffset="-5" ArrivalAirportTimeZoneOffset="-5" ScheduledAircraftType="ERJ" DepartureGate="22" ArrivalGate="B79" TrackingEnabled="False">

        <fh:Airline AirlineCode="XE" Name="Expressjet"/>

        <fh:Origin AirportCode="TUL" Name="Tulsa International Airport" City="Tulsa" StateCode="OK" CountryCode="US"/>

        <fh:Destination AirportCode="IAH" Name="George Bush Intercontinental Airport" City="Houston" StateCode="TX" CountryCode="US"/>

      </fh:FlightHistory>
 

AS3 syntax:

flight_mc.airline_txt.text = contentInput.channel.item.fh:FlightHistory;

Open in new window

0
Comment
Question by:cubical38
1 Comment
 

Accepted Solution

by:
cubical38 earned 0 total points
ID: 24747254
ANSWER:

URI is found at the top of the XML

namespace someNamespace = //put the namespace URI for fh suffix here
contentInput.channel.item.someNamespace::FlightHistory;
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now