Click here to Skip to main content
15,886,362 members
Articles / Desktop Programming / WTL

RSS Reader Plug-in for Internet Explorer

Rate me:
Please Sign up or sign in to vote.
5.00/5 (12 votes)
16 Jul 2007CPOL4 min read 317.3K   1.3K   32  
This is a toolbar for the Internet Explorer which shows information from RSS taken from the Internet.
/*
	Project		: RSS Reader plugin for Internet Explorer
	File Name	: RRPRssParser.h
	Date		: 
	Purpose		: It is the parser for the rss file. 
	Note		: 
	Send comments 
	or Bugs to	: prafulla_t@users.sourceforge.net
*/

#pragma once
#include "tinyxml.h"

#include "stdafx.h"
#include <vector>
#include "RRPRssItemIterator.h"

class RRPRssParser :  public RRPRssItemIterator {
public:
	RRPRssParser(const char *nameOfFile);
	~RRPRssParser(void);
	BOOL isError();
	const char* getErrorString();
	void parse();

	//Even though we have defined Iterator we need this function
	//To paint menu items correctly

	//Gets RSSItem at the specified position
	RRPRssItem *getRssItem(int index) {
		return rssItemVector[index];
	}

	//Returns how many RssItems are there
	int getVectorSize() {
		return rssItemVector.size();
	}

	
	
	RRPRssItemIterator* getItemIterator() {
		index = -1;
		return dynamic_cast<RRPRssItemIterator*>(this);
	};

	//Abstract methods from class RRPRssItemIterator 
	virtual BOOL hasNext();
	virtual RRPRssItem* getItem();
	
private:
	TiXmlDocument *doc;
	char *fileName;
	BOOL errorCode;
	std::vector<RRPRssItem *> rssItemVector;

	//Index for iteration,at a time only one iteration is possible!
	unsigned int index ;
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
Quote : "Life is all about solving problems and enjoying their solutions !! "

Comments and Discussions