- Joined
- Mar 27, 2007
- Messages
- 3
- Reaction score
- 1
- Points
- 3
- Your Mac's Specs
- MacBook 2Ghz Core2Duo
This program loads in a file via a URL (im doing this so i dont have to host the file for now), gets its html and converts it to a string. I then try and display the string and xcode brings up the bloody debugger.
Ive also tried performing other things on the html string, including using range to find substrings, none of them seem to liek the string that is created.
Any help would be grand. Thanks.
Ive also tried performing other things on the html string, including using range to find substrings, none of them seem to liek the string that is created.
Code:
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSData *data = [NSData dataWithContentsOfFile:@"/Users/Jayson/images.html"];
[data writeToFile:@"/Users/Jayson/html.html" atomically:YES];
NSString *theHTML = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(theHTML);
[theHTML release];
[pool release];
return 0;
Any help would be grand. Thanks.