Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-20-2010, 03:20 PM   #1 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 5
dchildress is on a distinguished road
Smile NSXMLParser reading cached contets

I have been developing now for just over two weeks and have hit my first snag. I am trying to download an xml file from our server to populate a sorting app for our school district. My code is listed below:
Code:
NSURL *url = [[NSURL alloc] initWithString:@"http://www.amherst.k12.va.us/ipod/words.xml" ];
	
	
	
	NSXMLParser *xmlParser = [[NSXMLParser alloc]   initWithContentsOfURL:url];
	
	//Initialize the delegate.
	
	XMLParser *parser = [[XMLParser alloc] initXMLParser];

I cannot figure out how to force it to clear the cache of the words.xml. When I change the contents of the file(words.xml) and launch the app it continues to display the old contents of the file. Thank you in advance for your help.
dchildress is offline   Reply With Quote
Old 09-08-2010, 04:06 PM   #2 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 5
dchildress is on a distinguished road
Default

Is there no one out there than can help with this problem? Is it that easy, that I should know it, do I need to explain my problem better?
dchildress is offline   Reply With Quote
Old 09-08-2010, 04:30 PM   #3 (permalink)
Pro. Game Developer
iPhone Dev SDK Supporter
 
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,176
Kalimba is on a distinguished road
Default

I just tried going wider on Google, and found something that might help. Look at the NSURLCache class here: NSURLCache Class Reference.

I don't have first-hand experience with the issue you're having, but it seems like calling something like the following code before you fetch the data might work:
Code:
[[NSURLCache sharedURLCache] removeAllCachedResponses];
Please share your results.
__________________
~~ Word Flurry ~~ App Store / Website / Facebook
Kalimba is offline   Reply With Quote
Old 09-09-2010, 03:51 PM   #4 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 5
dchildress is on a distinguished road
Default

Thank you Kalimba that did the trick!
dchildress is offline   Reply With Quote
Reply

Bookmarks

Tags
nsurl, nsxmlparser

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 313
20 members and 293 guests
baja_yu, cgokey, Domele, Duncan C, Fstuff, gbenna, givensur, guusleijsten, HowEver, iAppDeveloper, iphonedevshani, jbro, JoeRCruso, mdpauley, n00b, newDev, seokwon lee, SLIC, stanny, WheyLabs
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,112
Posts: 402,875
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:32 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0