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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:10:38+00:00 2026-05-26T16:10:38+00:00

Starting my first iOS project and wanted to advice on how to structure the

  • 0

Starting my first iOS project and wanted to advice on how to structure the application.
The app pulls a XML feed, parses it out and displays a list representing the items in the XML feed. When clicking on a item in the list the app will pull a new XML feed using one of the attributes from the previously pulled XML feed. This happens several layers of pull, parse, display and on user selection do the same thing over again. Now most of the XML element structure is something like this:

(These are simple examples just to demonstrate what’s going on)

  • http://site.com/get/items/

returns (Display info on new view):

<items>
    <item id="123" name="item 1" />
    <item id="124" name="item 2" />
    <item id="125" name="item 3" />
</itmes>
  • http://site.com/get/description/123 (Example user has selected item 1, make call to get description)

returns:

<itemDescription>
    <description itemId="123" name="desc 1" description="blah 1" />
</itemDescription>

Wanted to know:

  • Should I have a connection class/object or a new connection in each view?
  • Should I have a parser class/object or parse the XML feed in each view?
  • I’m also looking to store some of the data returned so I don’t need to call the XML feed again if the user navigates back to the main items list, but I would need to parse the itemsDescription XML feed every time.

I’ve looked at several tutorials on parsing XML and I get the gist of how to do this, wanting to focus more of the design and reusability instead of duplicating the code over in each new view. Or am I way off on how this works

  • 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-26T16:10:39+00:00Added an answer on May 26, 2026 at 4:10 pm

    The best way you can do this following Apple Guidelines is checking one of their examples, some months ago I made an app similar to yours following this example. Also you can see how to make your app in offline mode.

    Basic structure (w/o offline mode):

    The SeismicXML sample application demonstrates how to use NSXMLParser
    to parse XML data. When you launch the application it downloads and
    parses an RSS feed from the United States Geological Survey (USGS)
    that provides data on recent earthquakes around the world. It displays
    the location, date, and magnitude of each earthquake, along with a
    color-coded graphic that indicates the severity of the earthquake. The
    XML parsing occurs on a background thread using NSOperation and
    updates the earthquakes table view with batches of parsed objects.

    Advanced structure (with offline mode):

    Demonstrates how to use Core Data in a multi-threaded environment,
    following the first recommended pattern mentioned in the Core Data
    Programming Guide.

    Based on the SeismicXML sample, it downloads and parses an RSS feed
    from the United States Geological Survey (USGS) that provides data on
    recent earthquakes around the world. What makes this sample different
    is that it persistently stores earthquakes using Core Data. Each time
    you launch the app, it downloads new earthquake data, parses it in an
    NSOperation which checks for duplicates and stores newly founded
    earthquakes as managed objects.

    For those new to Core Data, it can be helpful to compare SeismicXML
    sample with this sample and notice the necessary ingredients to
    introduce Core Data in your application.

    Regarding cwieland answer I wouldn’t use ASIHTTPRequest because is outdated, so if you want to follow his approach I would recomend you to use AFNetworking, where you can handle an XML request easy and fast:

    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://api.flickr.com/services/rest/?method=flickr.groups.browse&api_key=b6300e17ad3c506e706cb0072175d047&cat_id=34427469792%40N01&format=rest"]];
    AFXMLRequestOperation *operation = [AFXMLRequestOperation XMLParserRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser) {
      XMLParser.delegate = self;
      [XMLParser parse];
    } failure:nil];
    
    NSOperationQueue *queue = [[[NSOperationQueue alloc] init] autorelease];
    [queue addOperation:operation];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just starting out in iOS development, so for my first project, I'm
I am now starting my first iOS application. It has a login-sreeen at beginning.
I'm just starting out in iOS app development,so if this question seems foolish please
I'm starting my first C# project, and I want to make a form designer
I am new to Blackberry programming and starting my first app soon. I believe
I'm starting on work on my first Windows Mobile 6.5 app in C#, and
I'm starting my first PhoneGap project and am developing using Visual Studio and Windows
I'm starting my first RoR project, and I've been a LESS user for a
I'm starting a small Rails project to register iOS devices here at the office,
I'm starting my first Sinatra App and I'm trying to use DataMapper. Everything is

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.