Note that there are some explanatory texts on larger screens.

plurals
  1. POParsing `<media:content>` RSS feed tags using touchXML
    primarykey
    data
    text
    <p>I have the following RSS feed that I'm trying to parse using touchXML for an iphone application.</p> <pre><code>&lt;rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:ext="http://ooyala.com/syndication/ext/" xmlns:mediasl="http://www.slide.com/funspace/developer/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:boxee="http://boxee.tv/spec/rss/"&gt; &lt;channel&gt; &lt;title&gt;Channel Title&lt;/title&gt; &lt;description&gt;Channel Description&lt;/description&gt; &lt;link&gt;link&lt;/link&gt; &lt;item&gt; &lt;title&gt;title&lt;/title&gt; &lt;guid isPermaLink="false"&gt;k2dDRpMTpto4kdpU_NhGmNGKRK0Ny0PH&lt;/guid&gt; &lt;pubDate&gt;Fri, 25 Jun 2010 06:53:48 +0000&lt;/pubDate&gt; &lt;media:title&gt;title&lt;/media:title&gt; &lt;media:keywords&gt;Others&lt;/media:keywords&gt; &lt;media:category scheme="http://www.ooyala.com"&gt;/JBay10&lt;/media:category&gt; &lt;media:category scheme="http://www.ooyala.com"&gt;/JBay10/Webisodes&lt;/media:category&gt; &lt;media:thumbnail url="http://ak.c.ooyala.com/k2dDRpMTpto4kdpU_NhGmNGKRK0Ny0PH/BqcWmm1bH0zjWgL35lMDoxOjBrO7OBB8" width="640" height="360"/&gt; &lt;dcterms:valid&gt;start=2010-06-25T06:53+00:00;scheme=W3C-DTF&lt;/dcterms:valid&gt; &lt;media:group&gt; &lt;media:content url="http://api.ooyala.com/syndication/stream_redirect?pcode=N2d2U6Azh1SxAcZeoJia-srBQAtY&amp;amp;expires=1277743230&amp;amp;streamID=2678810&amp;amp;signature=beZ2o45XNredayqbtIzzL7khsnt1EEjwByf0yMgSEv8&amp;amp;size=20985109&amp;amp;length=163280" type="video/mp4" medium="video" expression="full" bitrate="900" framerate="25.0" samplingrate="32.0" duration="163" lang="en"/&gt; &lt;/media:group&gt; &lt;/item&gt; ... &lt;/channel&gt; </code></pre> <p>The problem I'm having is that I cannot access the <code>&lt;media:...&gt;</code> tags especially the url at <code>&lt;media:content&gt;</code>. The code I'm using the following method to parse the rss feed.</p> <pre><code>-(NSMutableArray *) grabXMLFeed:(NSString *)feedAddress{ NSURL *url = [NSURL URLWithString: feedAddress]; CXMLDocument *rssParser = [[[CXMLDocument alloc] initWithContentsOfURL:url options:0 error:nil] autorelease]; NSArray *resultNodes = NULL; resultNodes = [rssParser nodesForXPath:@"//item" error:nil]; NSMutableArray *videos = [[NSMutableArray alloc] init]; for (CXMLElement *resultElement in resultNodes) { int counter; NSMutableDictionary *video = [[NSMutableDictionary alloc] init]; for(counter = 0; counter &lt; [resultElement childCount]; counter++) { NSString *val = [[resultElement childAtIndex:counter] stringValue]; if ([val length] != 0) { [video setObject:[[resultElement childAtIndex:counter] stringValue] forKey:[[resultElement childAtIndex:counter] name]]; } } [videos addObject:[video copy]]; [video release]; } return videos; } </code></pre> <p>What can I do to get the url stored at the <code>&lt;media:content&gt;</code> ?</p> <p>Thanks </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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