On 7 Jan 2009, at 11:24, Debajit Adhikary wrote:

I'm trying to parse XML directly from an HTTPS URL, as follows:

NSString *const URL = @"https://some/HTTPS/url";;
NSURL* url = [NSURL URLWithString:URL];NSXMLParser* parser = [[NSXMLParser
alloc] initWithContentsOfURL:url];
[parser setDelegate:self];
[parser parse];

[snip]

This seems to work fine for HTTP URL's, but shows no result for an HTTPS
URL.

How could I fix this?

I don't think the problem is the HTTPS url scheme as such. It's more likely something to do with the server at the far end. For instance, your HTTPS URL may require that some credentials are passed to the server (e.g. if it's using HTTP Basic auth.), and in that case I don't see how the -initWithContentsOfURL: method would know what to do on its own.

In that case, you might need to use NSURLConnection/NSURLRequest to do the fetch from the server first, so that you can respond to the relevant delegate methods and provide the necessary authentication data.

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to