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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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 01-25-2010, 12:52 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 109
Default Parse website for RSS Feed URL

Hi all,

I am trying to incorporate an RSS reader into my app, and I want to be able to parse a given URL for the URL of the RSS feeds associated with the URL. For example, I want the user to supply "http://www.engadget.com" and I want to return "feed://www.engadget.com/rss.xml"

Is this possible to use with the NSXML parser class. I have the parser set up to log what tags it returns, and I can't seem to figure out which (if any) of the tags it returns designates an RSS feed.

Thanks in advance!
brian515 is offline   Reply With Quote
Old 01-25-2010, 12:57 PM   #2 (permalink)
Obj-C Learner
 
Join Date: Apr 2009
Location: Manchester, UK
Posts: 1,030
Send a message via MSN to ZunePod Send a message via Yahoo to ZunePod
Default

This will only work for ones that you know, unless if you create something that trys different variations until it finds the right feed thing.
ZunePod is offline   Reply With Quote
Old 01-25-2010, 01:14 PM   #3 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 109
Default

Quote:
Originally Posted by ZunePod View Post
This will only work for ones that you know, unless if you create something that trys different variations until it finds the right feed thing.
So you're saying there's no way? Then how do browsers know there is an RSS feed present? There has to be a way.
brian515 is offline   Reply With Quote
Old 01-25-2010, 02:45 PM   #4 (permalink)
Super Moderator
 
Join Date: Oct 2009
Location: San Diego, CA
Posts: 1,578
Default

According to this page: Atom (standard) - Wikipedia, the free encyclopedia, RSS feeds are either linked to the word "Subscribe" or with the RSS icon. So you'll have to parse the HTML pages to find these elements. See if you can find those in your tag logs.
JasonR is offline   Reply With Quote
Old 01-25-2010, 02:55 PM   #5 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
Default

There's also an HTML tag that tells the browser if there's a feed for the current site. Do "view source" on this very web page, and you'll find this code:

Code:
<link rel="alternate" type="application/rss+xml" title="iPhone Dev SDK Forum RSS Feed" href="http://www.iphonedevsdk.com/forum/external.php?type=RSS2" />
	
<link rel="alternate" type="application/rss+xml" title="iPhone Dev SDK Forum - iPhone SDK Development - RSS Feed" href="http://www.iphonedevsdk.com/forum/external.php?type=RSS2&amp;forumids=19" />
__________________

Free Games!
smasher is offline   Reply With Quote
Old 01-25-2010, 03:21 PM   #6 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 109
Default

Quote:
Originally Posted by smasher View Post
There's also an HTML tag that tells the browser if there's a feed for the current site. Do "view source" on this very web page, and you'll find this code:

Code:
<link rel="alternate" type="application/rss+xml" title="iPhone Dev SDK Forum RSS Feed" href="http://www.iphonedevsdk.com/forum/external.php?type=RSS2" />
	
<link rel="alternate" type="application/rss+xml" title="iPhone Dev SDK Forum - iPhone SDK Development - RSS Feed" href="http://www.iphonedevsdk.com/forum/external.php?type=RSS2&amp;forumids=19" />
Thank you. I didn't realize that that was present on every webpage. So, to parse this out, I do not need the NSXMLParser? Sorry if this is a dumb question.
brian515 is offline   Reply With Quote
Old 02-07-2010, 03:58 PM   #7 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 27
Default

Quote:
Originally Posted by brian515 View Post
Thank you. I didn't realize that that was present on every webpage. So, to parse this out, I do not need the NSXMLParser? Sorry if this is a dumb question.
i was trying to parse html getting rss link elements but no luck.
Using

- (void)parserNSXMLParser *)parser didStartElementNSString *)elementName
I was able to see that there were link elements but i could not store that links into array.

did you find anything about this?

did anyone else work something like this?
tjnew is offline   Reply With Quote
Reply

Bookmarks

Tags
nsxmlparser, parse, parser, rss, 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: 267
20 members and 247 guests
@sandris, AdamL, ADY, Dani77, diyora, FAED, F_Bryant, GHuebner, HDshot, headkaze, mer10, Oral B, prchn4christ, Rudy, smithdale87, Thompson22, timle8n1, Touchmint, twerner, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,748
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

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