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 1075341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:15:30+00:00 2026-05-16T21:15:30+00:00

Below is my class, which simply reads an xml file and provides the contents

  • 0

Below is my class, which simply reads an xml file and provides the contents in e4x format. Unfortunately, after the constructors executes and sets the xmlProperties property with the expected values, it some how becomes null. Anyone know what I’m doing wrong?

    public class WebService
    {
    private var _propertiesReader:HTTPService;
    private var _xmlProperties:XML;

    public function WebService()
    {
        _propertiesReader = new HTTPService();
        _propertiesReader.url = "../resources/properties.xml";
        _propertiesReader.resultFormat = "e4x";
        _propertiesReader.contentType = "application/xml";
        _propertiesReader.addEventListener(ResultEvent.RESULT, function(event:ResultEvent):void
        {
            _xmlProperties = XML(event.result);
        });
        _propertiesReader.addEventListener(FaultEvent.FAULT, function(event:FaultEvent):void 
        {
            Alert.show("Unable to load properties content: " + event.fault.message + "\nPlease try again later.", "Properties File Load Error");    
        });
        _propertiesReader.send();
    }

    public function get xmlProperties():XML
    {
        return _xmlProperties;
    }
    }
  • 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-16T21:15:31+00:00Added an answer on May 16, 2026 at 9:15 pm

    _xmlProperties is being set by a File Load call (via a callback event). It is not being set directly in the constructor.

    Are you sure you are waiting for the call to finish and the callback event to fire before you check the value of _xmlProperty?

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

Sidebar

Related Questions

I have a data structure which is as given below: class File { public
I have two async classes in my application which you can see below class
I have a Model which has some constants defined, like below: class Order(models.Model): WAITING
I would like to create a JTable like the below picture: Which java class
I have abstract BaseController, which basically looks like below: public abstract class BaseController :
I have class like this below shown. which contains the shopping items where the
In the image below there is an area, which has an unknown (custom) class.
I want my class to implement Save and Load functions which simply do a
I am reading a simple text file which contains single line using filestream class.
Does making the below class final (adding public final class) have any real impact

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.