I need a little help, i have a search field and button which trigger this method but i get the error underneath.
- (IBAction)fetchTracks:(id)sender {
NSString *input = [searchField stringValue];
NSString *searchString = [input stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"searchString: %@", searchString);
NSError *error;
NSString* libraryPath = [[NSString alloc] initWithString:@"~/Music/iTunes/iTunes Music Library.xml"];
NSURL *url = [NSURL URLWithString:libraryPath];
[doc release];
doc = [[NSXMLDocument alloc] initWithContentsOfURL:url options:0 error:&error];
NSLog(@"doc: %@", doc);
[itemNodes release];
itemNodes = [[doc nodesForXPath:@"ItemSearchResponse/Items/Item" error:&error] retain];
[tableView reloadData];
}
* -[NSXMLDocument initWithContentsOfURL:options:error:]: nil argument
Can anyone help, thanks, Sami.