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, 02:47 PM   #3 (permalink)
Miles
New Member
 
Join Date: Jun 2009
Posts: 5
Default

Quote:
Originally Posted by Seidr View Post
Try this:
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!
Miles is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,560
Threads: 89,129
Posts: 380,270
Top Poster: BrianSlick (7,105)
Welcome to our newest member, jane
Powered by vBadvanced CMPS v3.1.0

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