Quote:
Originally Posted by Seidr
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!