• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Parsing XML from a Https URL using NSXMLParser?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsing XML from a Https URL using NSXMLParser?


  • Subject: Re: Parsing XML from a Https URL using NSXMLParser?
  • From: Alastair Houghton <email@hidden>
  • Date: Wed, 7 Jan 2009 14:45:20 +0000

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@hidden)

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:
This email sent to email@hidden


References: 
 >Parsing XML from a Https URL using NSXMLParser? (From: "Debajit Adhikary" <email@hidden>)

  • Prev by Date: Re: Problem with AFP server Notification seek advice.
  • Next by Date: Re: feed an NSCharacterSet to numberOfRowsInSection delegate method?
  • Previous by thread: Parsing XML from a Https URL using NSXMLParser?
  • Next by thread: Strange problem of first access to variable
  • Index(es):
    • Date
    • Thread