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

  • Home
  • SEARCH
  • 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 6557341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:03:42+00:00 2026-05-25T13:03:42+00:00

I have a problem while reading from XML file in action script 3. This

  • 0

I have a problem while reading from XML file in action script 3.

This is my XML-file:

<config>

    <production>
        <app_id>123</app_id>
        <server_path>http://someLinktoAccess</server_path>
        <assets_server>http://someLinktoAccess</assets_server>
        <payment_url_callback>http://someLinktoAccess</payment_url_callback>
    </production>

    <stage>
        <app_id>123</app_id>
        <server_path>http://someLinktoAccess</server_path>
        <assets_server>http://someLinktoAccess</assets_server>
        <payment_url_callback>http://someLinktoAccess</payment_url_callback>
    </stage>

    <dev>
        <app_id>123</app_id>
        <server_path>http://someLinktoAccess</server_path>
        <assets_server>http://someLinktoAccess</assets_server>
        <payment_url_callback>http://someLinktoAccess</payment_url_callback>
    </dev>

    </config>

I want to access to each key-value pair in this file. So I want to get from here 4 string variables: app_id, server_path, assets_server, payment_url_callback. How can I get them??

Now I’m using such a code:

private function loadXmlConfig():void
        {
            //load the loading config xml
            var xmlLoader:URLLoader = new URLLoader();
            var load_config_path:String = "http://dl.dropbox.com/u/28744968/android_vs.xml";
            xmlLoader.addEventListener(Event.COMPLETE, xmlConfigLoadingSuccessed);
            xmlLoader.addEventListener(IOErrorEvent.IO_ERROR,  xmlConfigLoadingFailed);
            xmlLoader.load( new URLRequest( load_config_path ) );
        }

        private function xmlConfigLoadingSuccessed(event:Event):void
        {
            var load_config:XML = new XML( event.target.data );
            trace(load_config.config.dev.app_id.value);
            //startup facade
            GameFacade.getInstance().startup( StartupCommand, this );
        }

The file is loaded with all values, but I can’t access any of them.

What mean this:

var library:XML
 library.@url

Thank you!

  • 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-25T13:03:43+00:00Added an answer on May 25, 2026 at 1:03 pm

    When using XML class you do not reference the root node in your case “config”

    // your code
    trace(load_config.config.dev.app_id.value);
    
    // correct code
    // the toString method should be called automatically
    trace(load_config.production.app_id);
    

    And to answer your other question.

    var library:XML
     library.@url
    

    the @ symbol is used to access attributes.

    <library id=123 >
    

    Why are you putting your config file as an xml anyway?
    This Type of thing I create a config file/class/Singleton for.

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

Sidebar

Related Questions

Hi friends hope all r doing well. I have a problem while reading xml
The while loop I have while reading in from a file doesn't break. I'm
i have a problem with reading from a file, and converting content to double.
I've been thinking about this problem for a while and have yet to come
I have this very huge XML file of size 2.8GB. This is Polish Wikipedia's
hello i got a problem with reading from a file, i am trying to
In the code below I have a StreamReader reading from a network stream. This
Basically my problem stems from a desire to have the textbox portion be white,
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I am learning the basics of reading from text files. I have code that

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.