Created
August 31, 2011 19:48
-
-
Save sbentzen/1184518 to your computer and use it in GitHub Desktop.
Grand Central Dispatch and NSXML Parser (the bad way)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSURL *xmlURL = [NSURL URLWithString:URL]; | |
rssParser = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL]; | |
[rssParser setDelegate:self]; | |
[rssParser setShouldProcessNamespaces:NO]; | |
[rssParser setShouldReportNamespacePrefixes:NO]; | |
[rssParser setShouldResolveExternalEntities:NO]; | |
rssQueue = dispatch_queue_create("com.example.parser", NULL); | |
dispatch_async(rssQueue, ^{ | |
[rssParser parse]; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSURL *xmlURL = [NSURL URLWithString:URL]; | |
rssParser = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL]; | |
[rssParser setDelegate:self]; | |
[rssParser setShouldProcessNamespaces:NO]; | |
[rssParser setShouldReportNamespacePrefixes:NO]; | |
[rssParser setShouldResolveExternalEntities:NO]; | |
rssQueue = dispatch_queue_create("com.example.parser", NULL); | |
dispatch_async(rssQueue, ^{ | |
[rssParser parse]; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment