iphone - Parsing substrings using NSRange. Seeking a more elegant solution -



iphone - Parsing substrings using NSRange. Seeking a more elegant solution -

i parsed xml rss feed using touchxml library. looks far. in description tag extract out 'img src' url thumbnail image. in past utilize

nsrange match; match = [self.tweettext rangeofstring: @"http://"];

then find end of string getting range of '\' , parsing out substring.

but thinking maybe not typical/optimal way handle kind of thing.

here nsdictionary printed out via nslog:

blog item: { category = "premier league"; description = "\n\n\t\t\t <img src=\"http://www.independent.co.uk/multimedia/dynamic/00620/charlieadam_620843k.jpg\" style=\"padding-right:5px;margin-right:5px\" align=\"left\" /> \n\t\t\t\t<p>\nliverpool manager kenny dalglish confident new signing charlie adam can \n have same impact @ club did @ blackpool.\n</p> "; guid = "http://www.independent.co.uk/sport/football/premier-league/kenny-dalglish-predicts-great-things-from-charlie-adam-2309339.html"; link = "http://www.independent.co.uk/sport/football/premier-league/kenny-dalglish-predicts-great-things-from-charlie-adam-2309339.html"; pubdate = "fri, 08 jul 2011 16:02:10 +0100"; text = "\n"; title = "kenny dalglish predicts great things charlie adam ";

can of show me nice way kind of thing?

kindest regards, -code

iphone objective-c ios

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -