View Full Version : RSS feeds???
death_knight
March 9, 2005, 06:51 PM
I've been doing a bit of research on rss i'm aware of what it is and what it is used for. now hwat i'm trying to figure out is how to display it on like a web portal that i designed, do i only need the rss aware program??
pigeonflight
March 9, 2005, 09:46 PM
actually you don't need the javascript part. Basically since it's
XML you need to be able to read it and translate it into HTML.
an example of an RSS feed: http://slashdot.org/index.rss
<rdf:RDF>
<channel rdf:about="http://slashdot.org/">
<title>Slashdot</title>
<link>http://slashdot.org/</link>
<description>News for nerds, stuff that matters</description>
<dc:language>en-us</dc:language>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://it.slashdot.org/article.pl?sid=05/03/10/007222&from=rss"/>
<rdf:li rdf:resource="http://it.slashdot.org/article.pl?sid=05/03/09/2359234&from=rss"/>
</rdf:Seq>
</items>
</channel>
<image rdf:about="http://images.slashdot.org/topics/topicslashdot.gif">
<title>Slashdot</title>
<url>
http://images.slashdot.org/topics/topicslashdot.gif
</url>
<link>http://slashdot.org/</link>
</image>
<item rdf:about="http://it.slashdot.org/article.pl?sid=05/03/10/007222&from=rss">
<title>Microsoft Uncertain About WinFS for XP</title>
<link>
http://it.slashdot.org/article.pl?sid=05/03/10/007222&from=rss
</link>
<description>
Ant writes "As a follow-up to WinFS to be available in WinXP story from a few days ago, BetaNews reports that Microsoft (MS) stopped short of confirming reports that it plans to back-port its next-generation WinFS file system architecture to Windows XP. MS tells BetaNews it is only evaluating the move while also acknowledging WinFS is still years off. "We are currently evaluating making the WinFS storage subsystem available on this platform and will make the decision based on what is best for customers." a Microsoft spokesperson told BetaNews."
</description>
</item>
<item rdf:about="http://it.slashdot.org/article.pl?sid=05/03/09/2359234&from=rss">
<title>Consumers Data Stolen from LexisNexis</title>
<link>
http://it.slashdot.org/article.pl?sid=05/03/09/2359234&from=rss
</link>
<description>
LE UI Guy writes "Reuters is currently running a story regarding LexisNexis being tapped into by identity thieves who accessed up to 32,000 customer profiles. Information hit included names, addresses, Social Security and driver's license numbers. This comes on the heels of rival ChoicePoint being breached for 145,000 profiles last month in a similar case. Better check yourself." Update: 03/10 02:40 GMT by J: ChoicePoint's name corrected (and, it may be more than 145,000, they don't know).
</description>
</item>
</rdf:RDF>
If you look through this code you will see that there are "item" tags which contain "link" and "description" tags. Very human readable, but more importantly very machine readable. So you simply need to write a script or find a script which can pick out the "link" and "description" for each item.
I don't know what language you're using, but I know that python has great xml parsing utilities, but you can use anything really.
Hope that helps.
death_knight
March 9, 2005, 10:56 PM
thanks alot pigeonflight, using php, i totally get what it is now i just need to check out xml parsing for php then. and to think i bought a couple xml book a while back when i was doing my final project and thought i'ld never use them.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.