Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 594737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:59:09+00:00 2026-05-13T15:59:09+00:00

I have a basic question. I am loading an XML file using the URLLoader

  • 0

I have a basic question. I am loading an XML file using the URLLoader and putting it into an XML variable.

My question is, can i leverage E4x to go through this xml data.

I tried doing

    for each (var grid in xmlData.grid){

        output.text=grid.name;

    }

But it says that variable ‘grid’ has no type declaration. This might make some sense since there is no way for the compiler to know before hand the structure of the XML that i am loading.

But since i am new to AS3 and flex, i was wondering if there is a way of leveraging E4x?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:59:09+00:00Added an answer on May 13, 2026 at 3:59 pm

    You could type it anonymously (it would solve the problem):

    for each( var grid:* in xmlData.grid) {
    

    but before you do that, consider these options here:

    // NOTE: This is a for...in, not a for each...in
    for (var grid:XML in xmlData.grid){
    
        // This will give you the node name: 
        // <foo/> returns (basically) "foo"
        output1.text=grid.name();
    
        // This will give you the node attribute called name: 
        // <foo name="bar"/> returns bar
        output2.text=grid.@name;
    
        // This will give you the child node named 'name': 
        // <foo><name>Heidi</name></foo> returns <name>Heidi</name>, which, 
        // when translated, should output "Heidi" as text
        output3.text=grid.name;
    }
    

    If you use one of those judiciously, it will probably be closer to what you’re looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 306k
  • Answers 306k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer No but it could be easily emulated with: class MagicArray<T>… May 13, 2026 at 9:21 pm
  • Editorial Team
    Editorial Team added an answer One thing I notice that's different between your two examples:… May 13, 2026 at 9:21 pm
  • Editorial Team
    Editorial Team added an answer An auto-reset event is like a gate that closes after… May 13, 2026 at 9:21 pm

Related Questions

This may seem like a very basic question but I did not seem to
I have a Property Grid in C#, loading up a 'PropertyAdapter' object (a basic
I am working on a website hosted on microsoft's office live service. It has
I am having troubles uninstalling a shared win32 SxS assembly using Wix3 on WinXP.
I'm in the process of trying to hack together the first bits of a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.