Solved

AS3/XML parse XML nodes with attributes

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
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.

680 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