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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:02:19+00:00 2026-05-18T11:02:19+00:00

I am getting list using url by doing parsing it using xml parser. sometimes

  • 0

I am getting list using url by doing parsing it using xml parser. sometimes the server is not working properly. then how to give an alert when server is not working properly. I have given the code below

-(NSMutableArray*)getCustomerList:(NSString *)count category:(NSString *)aCategory alphabetic:(NSString *)alphabeticValue favorite:(NSString *)isFavoriteString
{
    [self updateStatus];
    if (internetConnectionStatus == NotReachable) 
    {

        UIAlertView *reachbleAlert = [[UIAlertView alloc] initWithTitle:@"message"
                                                                message: @"No network available alert"
                                                               delegate:self 
                                                      cancelButtonTitle:@"Ok"
                                                      otherButtonTitles: nil];
        [reachbleAlert show];   
        [reachbleAlert release];
        return 0;
    }
    else 
    {

        NSString *urlString=@"http:getCustomerList.jsp";
        urlString = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
        [dataParser parseXMLFileAtURL:[NSURL URLWithString:urlString]];
        NSMutableArray *list =[dataParser getCustomerListFromParser];
        printf("\n url for Customer List%s",[urlString UTF8String]);
        printf("\n Customer List   %d",[list count]);
        return list;
    }
}

I am sending parameter to url to return repctive list when it returns zero I am dispalying alert in view controller.

but when server is not working properly then how to display this alert.

Please help me out of this.

Thank you,
Madan mohan.

  • 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-18T11:02:20+00:00Added an answer on May 18, 2026 at 11:02 am

    In my opinion :
    First perform the request operation to the server for any response.

    Secondly Catch the the response received in a BOOL variable .

    Finally when your BOOL variable is TRUE perform the desired operation [Such as parsing..]
    Otherwise just show an alert message with a proper error message.

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

Sidebar

Related Questions

I am trying to sort a list using delegates but I am getting a
I am having a problem getting a list of fields from a query defined
Why am I getting a textbox that returns undefined list of variables? When I
I believe I'm getting bitten by some combination of nested scoping rules and list
Getting the subdomain from a URL sounds easy at first. http://www.domain.example Scan for the
I getting the following error when I try to connect to my server app
I am trying to import the contact list from gmail using libgmailer.php but I
I'm getting some very jerky scrolling while using the code below to create a
Getting super frustrated trying to get this working. Basically this is for a site
Just looking at ways of getting named constants in python. class constant_list: (A_CONSTANT, B_CONSTANT,

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.