#ifndef OF_SCRAPER_PARSER
#define OF_SCRAPER_PARSER


#include <string>
#include <vector>

#include "tree.h"
#include "parser.h"
#include "xpath.h"
#include "xpathInternals.h"
#include "HTMLparser.h"

#include "ofScraperXmlNode.h"

using namespace std;

class ofScraperParser{


	public: 
		
		ofScraperParser ();
		~ofScraperParser ();
		
		void 					reset();
		ofScraperXmlNode 		parseHtml (string  input);	// better if you pass this through tidy first
		//void   parseHtml (const string& input, ofScraperXmlNode& node );		
		
		//.... 		evaluateXpath(string xpath);
		//.... 		evaluateRegex();
		
		std::vector<ofScraperXmlNode>  getContentOfXpathExpression(ofScraperXmlNode & node, string expression);
		
		htmlParserCtxtPtr 	ctxt;
		xmlDocPtr 			doc;
	
};



#endif
