Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{
- NSLog(@"ended element: %@", elementName);
- if ([elementName isEqualToString:@"item"]) {
- // save values to an item, then store that item into the array...
- [item setObject:currentTitle forKey:@"title"];
- [item setObject:currentLink forKey:@"link"];
- [item setObject:currentSummary forKey:@"summary"];
- [item setObject:currentDate forKey:@"date"];
- [item setObject:currentImage forKey:@"media:thumbnail"];
- <item><title>Knife robberies and burglaries up</title>
- <description>The number of robberies carried out at knife-point has increased sharply and burglaries are also up, latest crime figures indicate</description>
- <link>http://news.bbc.co.uk/go/rss/-/1/hi/uk/7844455.stm</link>
- <guid isPermaLink="false">http://news.bbc.co.uk/1/hi/uk/7844455.stm</guid>
- <pubDate>Thu, 22 Jan 2009 13:02:03 GMT</pubDate><category>UK</category>
- <media:thumbnail width="66" height="49" url="http://newsimg.bbc.co.uk/media/images/45400000/jpg/_45400861_policegeneric_pa.jpg"/>
- </item>
- parser:didStartElement:namespaceURI:qualifiedName:attributes:
Add Comment
Please, Sign In to add comment