#ifndef __HTML_PARSER_DOM_H__
#define __HTML_PARSER_DOM_H__
#include "ParserSax.h"
#include "tree.h"
namespace htmlcxx
{
namespace HTML
{
class ParserDom : public ParserSax
{
public:
ParserDom() {}
~ParserDom() {}
const tree &parseTree(const std::string &html);
const tree &getTree()
{ return mHtmlTree; }
protected:
virtual void beginParsing();
virtual void foundTag(Node node, bool isEnd);
virtual void foundText(Node node);
virtual void foundComment(Node node);
virtual void endParsing();
tree mHtmlTree;
tree::iterator mCurrentState;
};
std::ostream &operator<<(std::ostream &stream, const tree &tr);
} //namespace HTML
} //namespace htmlcxx
#endif