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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:05:43+00:00 2026-06-07T19:05:43+00:00

I’m writing an iPad app that pulls various coordinates from an XML file on

  • 0

I’m writing an iPad app that pulls various coordinates from an XML file on a web server, parses the information, and renders them on the screen.

I was wondering if any of you have tips/suggestions on how I could have it refresh the data continuously, say, every second (since a computer program updates the XML file on the server every few seconds). Thanks!

  • 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-07T19:05:45+00:00Added an answer on June 7, 2026 at 7:05 pm

    You’re definitely going to need to implement a multi-threaded background operation for this, or your app will be entirely unresponsive. Before I go on, I must state that constantly querying a server for the app’s entire execution is a bad idea, not only will it chew through data, but having to keep the Wi-Fi/3G/4G antenna constantly alive will drain the user’s battery much faster.

    I would consider relaxing the requirements to pulling the data down say every 10 seconds or so (since the server only updates it every few seconds and you have to factor in the time to download and render the currently grabbed co-ords), or even wait for the user to push a refresh button etc.

    To answer the question as it stands, there’s a few ways of doing this, the easiest of which is probably using a framework like ASHTTPRequest (It’s no longer maintained though, for modern projects there’s libraries like AFNetworking). They handle the asynchronous download of data from a server amongst many other useful network functions.

    The ideal process for your requirements would look something like:

    1. Create NSOperationQueue (or queue from added networking library)
    2. Use NSTimer to keep creating subclassed NSOperation to do download from server (or again, equiv. function from networking library). Every x seconds it sends this request to the queue.
    3. Upon a completed download, update the UI with the new data (note that any functionality that changes the UI has to be done from the main thread, so if you handle this in your NSOperation/etc you’ll have to use a performSelectorOnMainThread or equivalent!)

    Hope that helps! If you don’t want to include an external library, I did have a small sample project that creates instances of an subclassed NSOperation that performs an NSURLConnection, sends them to an NSOperationQueue and executes them concurrently. You could easily modify it to do only 1 operation at a time, change the NSURLConnection to download and parse the server data, and then update the main thread. It’s here if you’re interested.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am writing an app with both english and french support. The app requests
I'm parsing an XML file, the creators of it stuck in a bunch social
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a view passing on information from a database: def serve_article(request, id): served_article
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.