1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #include <string>
- #include <vector>
- using namespace std;
- class parser{
- bool _channel;
- bool _item;
- bool _content;
- int _channel_tags;
- int _item_tags;
- string _channel_title;
- string _channel_link;
- string _item_title;
- string _item_link;
- string _item_description;
- vector<string> _links;
- vector<string> _titles;
- vector<string> _descriptions;
- public:
- parser(): _channel(false), _item(false), _content(false), _channel_tags(0), _item_tags(0){}
- void rss(string line);
- void rss_link(string& line);
- void rss_description(string& line);
- void rss_start_item(string& line);
- void rss_end_description(string& line);
- void rss_end_item(string& line);
- void detect_rss_standard(const string& rss_text);
- void atom(string line);
- void title(string& line);
- int next_tag(const string& line);
- int next_tag_atom(const string& line);
- void atom_link(string& line);
- void atom_description(string& line);
- void atom_start_item(string& line);
- void atom_end_description(string& line);
- void atom_end_item(string& line);
- void get_news();
- void download_news(const string& xml);
- void delete_tags(string& line);
- void clean_string(string& line);
- void escape_character_sql(string& line);
- string decode_html_chars(string line);
- };
|