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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:47:10+00:00 2026-06-07T14:47:10+00:00

I am developing my first app, which takes an XML feed from the web.

  • 0

I am developing my first app, which takes an XML feed from the web.

The first time the XML loads into the TableView, everything is normal, but when I want to reload data by tapping the button, it halts for a few seconds before reloading the XML and table view. How can I avoid this halt time?

When I tap on a table cell to go to the next TableViewController, it also halts for a few seconds while loading an XML feed to show the list.

My app is like a native blog app for iPhone, and has categories and subcategories.

  • 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-06-07T14:47:13+00:00Added an answer on June 7, 2026 at 2:47 pm

    refer a following process.


    @interface YourViewController : UITableViewController<NSURLConnectionDelegate,NSXMLParserDelegate>
    //some declartion property...
    @end
    

    @implementation YourViewController
    
    - (void)viewDidLoad
      {
        [super viewDidLoad];
    
        isParsingStart = NO;
        webData = [[NSMutableData alloc] init];
        connection = [[NSURLConnection alloc] initWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:YOUR_XML_URL] cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:20] delegate:self];
      }
    
     - (void)tappingButton:(UIButton *)sender
      {   
        if(isParsingStart)
        {
          //show a alert view... or other do stuff 
          return;
        }
         webData = [[NSMutableData alloc] init];
         connection = [[[NSURLConnection alloc] initWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:YOUR_XML_URL] cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:20] delegate:self] autorelease];
      }
    
      - (void) connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
      {
         [webData appendData:data];
      }
    
     - (void) connectionDidFinishLoading:(NSURLConnection *)connection
      {
    
         parser = [[NSXMLParser alloc] initWithData:webData];
         parser.delegate = self;
         if([parser parse])
         {
           isParsingStart = NO;
           NSLog(@"The XML is Parsed.");
           [[self tableView] reloadData];
         }
         else 
         {
            isParsingStart = NO;
            NSLog(@"Failed to parse the XML");
         }
    
           [webData setData:nil];
      }
    
    - (void)parserDidStartDocument:(NSXMLParser *)parser
      {
          isParsingStart = YES;
      }
    
      - (void)parserDidEndDocument:(NSXMLParser *)parser
      {
          //do stuff
      }
    
      - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict
      {
         // do stuff
      }
    
      - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
      {
         // do stuff
      }
    
               .
               .
               .
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was developing an app which saves the image uri taken from camera first
I've been developing my first iPhone app part-time and would like to start using
I'm developing a QA web-app which will have some points to evaluated assigned to
I've been developing my first web based app for about two months now (I'm
I learning Python (coming from a dotnet background) and developing an app which interacts
Cheers, I am currently developing my first app featuring In App Purchases. Everything is
I am developing my first facebook app, which includes creating a new album and
I am developing my first facebook app, which includes creating a new album and
I am developing my first Rails app, a web replacement to a paper form
I've been developing my first Java EE app, which has a number of JPA

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.