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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-24-2009, 03:00 PM   #4 (permalink)
smithdale87
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,548
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

Quote:
Originally Posted by Miles View Post
Thanks for the reply!

In the project I linked to, I altered XMLAppDelegate.m by replacing the lines:

Code:
	NSURL *url = [[NSURL alloc] initWithString:@"http://sites.google.com/site/iphonesdktutorials/xml/Books.xml"];
	NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
with:

Code:
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:[NSData datawithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"test.xml"]]]
When attempted to Build and Go, I received the warning:

Code:
.../XML/Classes/XMLAppDelegate.m:22: warning: 'NSData' may not respond to '+datawithContentsOfFile:'
and errors on the following lines:

Code:
	XMLParser *parser = [[XMLParser alloc] initXMLParser];
error: expected ',' or ';' before 'XMLParser'
Code:
	[xmlParser setDelegate:parser];
error: 'XMLParser' undelcared (first use in this function)
As you might guess, I am a newbie developer, and I would appreciate any guidance anyone could provide.

Thanks again!
Capitalization problems...

Code:
datawithContentsOfFile
should be
Code:
dataWithContentsOfFile

and it sshould be NSXMLParser
smithdale87 is offline   Reply With Quote
 

» Advertisements
» Online Users: 721
20 members and 701 guests
14DEV, ADY, dacapo, dapis, denied, fanarin, Fit4him, fkmtc, GHuebner, jakerocheleau, jimbo, mathieuh, padsoftware, Punkjumper, Reyna, ric2z, RickSDK, Rikco, Thompson22, tymex
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,558
Threads: 89,128
Posts: 380,258
Top Poster: BrianSlick (7,103)
Welcome to our newest member, thesooty
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:40 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.