Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developing an RSS Feed Reader in C++

Tags:

c++

xml

sockets

I wanna write a simple RSS Feed reader in C++. I understand that the basic requirement is to understand XML parsing ( at the low level), opening, reading/writing, closing sockets and stuff like that. I don't need help in coding for sure. But It would be great if someone can help in getting started with RSS Protocol. E.g.. How exactly do I open socket ( for http I used 80, for IRC I had used the 6667 and so on).. and the protocol or commands to interact with a RSS Feed socket. I've also contemplated using third party libraries for XML n stuff. But I wanna do everything from scratch. Any help would be appreciated! and also, if not in the right direction.. please guide !

Thanks and Regards, Vamsi Krishna

like image 729
Vamsi Avatar asked Oct 13 '10 22:10

Vamsi


People also ask

Does RSS use XML?

RSS is a Web content syndication format. Its name is an acronym for Really Simple Syndication. RSS is a dialect of XML. All RSS files must conform to the XML 1.0 specification, as published on the World Wide Web Consortium (W3C) website.

Is RSS feed pull or push?

RSS is just a data format. Nothing more. It neither pushes nor pulls. It is typically accessed by polling (and the format includes the ability to specify how often it should be polled as metadata).

How do I add an RSS feed to my reader?

When you are on your favorite website, look for a small orange icon with the letters RSS or XML. When you click on that icon, you add that web address or link to your reader. You can also search for a website within your RSS reader and add it to your feed.


2 Answers

If you want to "do everything from scratch" as a learning exercise then go for it. However, if your goal is a to write an app to solve a problem then I'd suggest using off-the-shelf librarys as much as possible.

Assuming you're after the learning experience...

  • Make a socket connection to port 80 on the server hosting the RSS feed
  • Send an HTTP request for the feed
  • Receive the feed
  • Parse the feed

And I guess you want to write your own XML parser?

like image 57
dgnorton Avatar answered Sep 24 '22 14:09

dgnorton


To get started, just go to [http://stackoverflow.com/feeds/tag/c++], which is an RSS feed for StackOverflow C++ question. As you can see it's an ordinary HTTP connection. View source.

like image 22
Cheers and hth. - Alf Avatar answered Sep 23 '22 14:09

Cheers and hth. - Alf