Solved

AS3/XML parse XML nodes with attributes

Posted on 2009-06-30
1
549 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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.

747 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

12 Experts available now in Live!

Get 1:1 Help Now