Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-20-2011, 08:52 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 210
lukeirvin is on a distinguished road
Default Need help getting a specific URL through NSXMLParsing

<item>
<title><![CDATA[Title]]></title>
<link><![CDATA[http://www.google.com/]]></link>
<description><![CDATA[<p>description</p>]]></description>
<guid isPermaLink="false"><![CDATA[3a75fc4823f420f999070aff9ed749ce]]></guid>
<media:thumbnail url="http://www.google.com/thumbnail" />
<pubDate>Sun, 11 Sep 2011 04:29:48 +0000</pubDate>
<itunes:explicit>no</itunes:explicit>
<itunes:keywords>google, test, test, test</itunes:keywords>
<itunes:subtitle />
<itunes:duration>574</itunes:duration>
<enclosure length="6117447" type="audio/mpeg" url="http://www.google.com/song.mp3" />
</item>

I am working on an app to stream a podcast. The last url points to the .mp3 of the podcast.

I am able to parse through this and get everything except this last URL.

I am able to print out in the debugger the title, link, description, pubDate, etc. but I can't figure out what to search for exactly to get this URL. I've tried enclosure, and I have also tried removing everything around the URL.

Any thoughts on how to approach this?
lukeirvin is offline   Reply With Quote
Old 10-20-2011, 08:59 AM   #2 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Code:
- (void)parser:(NSXMLParser *)theParser 
didStartElement:(NSString *)elementName 
  namespaceURI:(NSString *)namespaceURI 
 qualifiedName:(NSString *)qualifiedName 
    attributes:(NSDictionary *)attributeDict
It's in the attributeDict.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 10-20-2011, 09:20 AM   #3 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 210
lukeirvin is on a distinguished road
Default

Right, I understand where to do the coding for it, but I'm just not sure what to look for exactly to get this URL. Mind elaborating a little more please?
lukeirvin is offline   Reply With Quote
Old 10-20-2011, 09:20 AM   #4 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Have you tried looking at the contents of the dictionary?
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Reply

Bookmarks

Tags
nsxmlparser, url

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 398
14 members and 384 guests
13dario13, 7twenty7, buggen, EvilElf, glenn_sayers, j.b.rajesh@gmail.com, LunarMoon, morterbaher, n00b, QuantumDoja, sacha1996, Sami Gh, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,673
Threads: 94,122
Posts: 402,906
Top Poster: BrianSlick (7,990)
Welcome to our newest member, morterbaher
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:27 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0