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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:31:10+00:00 2026-05-24T08:31:10+00:00

I am fetching XML data from server i want that when data is loading

  • 0

I am fetching XML data from server i want that when data is loading in progress i show a loading bar with default screen this is code in appDidFinishing

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    RootViewController * rootViewController = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];    
    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController];  
    [self.window addSubview:navigationController.view];  


    self.activityIndicator =  [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(55, 67, 100, 100)];    

    [self.activityIndicator startAnimating];  
    [self.window addSubview:self.activityIndicator];  
    [self loadXMlTwo];
    [self loadXMlMain];
    [self performSelectorInBackground:@selector(loadXMlOne) withObject:nil];  

    [self.activityIndicator removeFromSuperview];



    [window makeKeyAndVisible];

    return YES;

}

-(void)loadXMlMain{

NSURL*url= [[NSURL alloc]initWithString:@"http://46.137.28.14/app/ipadApplic/working.xml"];



NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];

//Initialize the delegate.

XMLParser *parser = [[XMLParser alloc] initXMLParser];

//Set delegate

[xmlParser setDelegate:parser];         
BOOL success = [xmlParser parse];

if(success)

    NSLog(@"No Errors");

else

    NSLog(@"Error Error Error!!!");

}
-(void)loadXMlOne{

NSURL*url1=[[NSURL alloc] initWithString:@"http://46.137.28.14/app/ipadApplic/rowone.xml"];






NSXMLParser *xmlParserRow = [[NSXMLParser alloc] initWithContentsOfURL:url1];

//Initialize the delegate.

RowOneParser *parser1 = [[RowOneParser alloc] initXMLParser];   
//Set delegate

[xmlParserRow setDelegate:parser1];         
BOOL success1 = [xmlParserRow parse];

if(success1)

    NSLog(@"No Errors");

else

    NSLog(@"Error Error Error!!!");

}
-(void)loadXMlTwo{
NSURL*urlRowTwo=[[NSURL alloc] initWithString:@”http://46.137.28.14/app/ipadApplic/rowtwo.xml”%5D;
NSXMLParser *xmlParserRowTwo = [[NSXMLParser alloc] initWithContentsOfURL:urlRowTwo];

//Initialize the delegate.

RowTwoParser *parserRowTwo = [[RowTwoParser alloc] initXMLParser];

//Set delegate

[xmlParserRowTwo setDelegate:parserRowTwo];         
BOOL successRow = [xmlParserRowTwo parse];

if(successRow)

    NSLog(@"No Errors");

else

    NSLog(@"Error Error Error!!!");

}

  • 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-24T08:31:11+00:00Added an answer on May 24, 2026 at 8:31 am

    What you need to do is unblock your main thread while you are doing background fetch of xml data. Easiest way to do that is add your fetch operations in NSOperationQueue. Set up delegates for the class which fetches the xml and handle the response.

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

Sidebar

Related Questions

I want to create a dynamic (fetching data from the database) XML sitemap which
My application is fetching data from a Xml file on a webpage. That date
I have a data fetching method that uses jQuery.ajax() to fetch xml files. /*
I'm fetching an XML file using this code: function getMaps(){ toLoad = loadMaps.length; for
I'm making a chrome extension that requires fetching an xml file from a secure
I am fetching the youtube viewcount from the Youtube XML data obtained from the
I want to fetch data from this URL: http://webservices.ns.nl/ns-api-stations . This URL requires a
I'm fetching data (images, 200-400kb) from WCF service to Silverlight client and notice that
I want to do xml parsing in j2me for fetching data (sms, mms, location)
I have written a script which is fetching data from database. Now I want

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.