tags:

views:

213

answers:

2

Is NSXMLParser's parse method asynchronous?

in other words if i have an NSXMLParse object and i call [someParseObject parse] from the main thread, will it block the main thread while it does it's thing?

-Thanks for answering this seemingly noob question. -Ben

+7  A: 

It is not asynchronous so it will block the main thread.

Mike Weller
A: 

NSXMLParser can parse URL/Data, If we parse URL directly, it will freeze the UI(Main Thread),instead of that you can use Data Parsing by using NSXMLParser.Please go through NSURLConnection API for asynchronous fetching the data.

Srinivas G