/* This file is part of Metaproxy.
- Copyright (C) 2005-2013 Index Data
+ Copyright (C) Index Data
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
namespace metaproxy_1 {
class HTMLParserEvent {
public:
- virtual void openTagStart(const char *name) = 0;
- virtual void anyTagEnd(const char *name) = 0;
- virtual void attribute(const char *tagName, const char *name, const char *value) = 0;
- virtual void closeTag(const char *name) = 0;
+ virtual void openTagStart(const char *tag, int tag_len) = 0;
+ virtual void anyTagEnd(const char *tag, int tag_len,
+ int close_it) = 0;
+ virtual void attribute(const char *tag, int tag_len,
+ const char *attr, int attr_len,
+ const char *value, int val_len,
+ const char *sep) = 0;
+ virtual void closeTag(const char *tag, int tag_len) = 0;
virtual void text(const char *value, int len) = 0;
+ virtual ~ HTMLParserEvent();
};
class HTMLParser {
+ class Rep;
public:
HTMLParser();
~HTMLParser();
- void parse(HTMLParserEvent & event, const char *str) const;
+ void parse(HTMLParserEvent &event, const char *str) const;
+ void set_verbose(int v);
+ private:
+ boost::scoped_ptr<Rep> m_p;
};
}