Note that there are some explanatory texts on larger screens.

plurals
  1. POFinding image in RSS feed - iOS
    text
    copied!<p>I am making an app for my site, which I need to include images in the table view.</p> <p>RSS picture I'm trying to find:</p> <pre><code>&lt;description&gt; &lt;![CDATA[ &lt;img width="1100" height="1010" src="http://www.x86cam.com/wp-content/uploads/2013/11/twilight_sparkle_with_the_twicane_by_diamondsword11-d6vn28u.png" class="attachment- wp-post-image" alt="twilight_sparkle_with_the_twicane_by_diamondsword11-d6vn28u" style="display: none" /&gt;I will not give any links, but I just need to warn y&amp;#8217;all. Watch out for spoilers all over sites. Source: Here ]]&gt; &lt;/description&gt; </code></pre> <p>I don't know how I would find the image tag in this.</p> <pre><code>#pragma mark - parsing of RssFeed Values -(void) parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict{ element = elementName; if ([element isEqualToString:@"item"]) { item = [[NSMutableDictionary alloc]init]; title = [[NSMutableString alloc]init]; link = [[NSMutableString alloc] init]; desc = [[NSMutableString alloc] init]; image = [[NSMutableString alloc] init]; pubDate = [[NSMutableString alloc] init]; } } -(void) parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{ if ([elementName isEqualToString:@"item"]) { [item setObject:title forKey:@"title"]; [item setObject:link forKey:@"link"]; [item setObject:desc forKey:@"description"]; [item setObject:pubDate forKey:@"pubDate"]; [feeds addObject:[item copy]]; } } -(void) parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{ if ([element isEqualToString:@"title"]) { [title appendString:string]; }else if ([element isEqualToString:@"link"]){ [link appendString:string]; }else if ([element isEqualToString:@"description"]){ [desc appendString:string]; }else if ([element isEqualToString:@"pubDate"]){ [pubDate appendString:string]; } } - (void)parserDidEndDocument:(NSXMLParser *)parser { [self.tableView reloadData]; } </code></pre> <p>I would like the app to parse the XML and find the <code>&lt;img&gt;</code> tag in the <code>&lt;description&gt;</code> and then get the <code>src=""</code></p> <p>Anyone willing and able to help me on this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload