Skip to content

Instantly share code, notes, and snippets.

View sbentzen's full-sized avatar

Shaun Bentzen sbentzen

View GitHub Profile
@sbentzen
sbentzen / GCD+NSXML-Bad.m
Created August 31, 2011 19:48
Grand Central Dispatch and NSXML Parser (the bad way)
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];
});