View Full Version : How to download HTML file (from web) into NSString?

Sep 5, 2008, 03:01 PM
I'm working on a Cocoa command-line tool to download RSS feeds, and I'm wondering how to download a file that is on the web at some location http://site.com/file.xml and store the source code of that file in an NSString. Do I need the WebKit framework? If so, how can this be implemented with WebKit.


Sep 5, 2008, 03:02 PM
use cURL to do it, very easy to do with cURL

Sep 5, 2008, 03:10 PM
Take a look at the

+ (id)stringWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error

in NSString