Re: NSXMLParser and multithreading
Re: NSXMLParser and multithreading
- Subject: Re: NSXMLParser and multithreading
- From: Benjamin Stiglitz <email@hidden>
- Date: Tue, 16 Sep 2008 11:58:28 -0400
Excerpts from Mark Thomas's message of Tue Sep 16 11:36:41 -0400 2008:
> Was wondering if somebody could answer how thread safe NSXMLParser is, as
> I need to use it with NSURL set to remote server and the response could take
> a while, so this why I want to put off into another thread.
Instances of NSXMLParser can be safely used from any thread, but only by one
thread at a time. It would be acceptable to instantiate and remotely load the
data from a secondary thread in your app.
>
> While I can see it can be used with a NSURL, is there a way I can do a
> HTTP POST with it when I pass it into a NSXMLParser ? As I want to parser
> the results which the server will send me.
You'll need to do the POST yourself and then pass the response as an NSData to
NSXMLParser.
-Ben
_______________________________________________
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