Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

Graves Robber
($1.99)

African Adventure
($0.99)

iTazer
($0.99)

ArtStudio
($3.99)

Pigs Vs Wolves
($1.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
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 23,539
Threads: 38,286
Posts: 168,254
Top Poster: smasher (2,533)
Welcome to our newest member, emusher
Powered by vBadvanced CMPS v3.1.0

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