Riremito

html parser/html.h

Apr 14th, 2017
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #ifndef __HTML_H__
  2. #define __HTML_H__
  3.  
  4. class HTMLTag{
  5. private:
  6.     char *tag;
  7.     char *fulltag;
  8.     char *text;
  9.     HTMLTag *next;
  10.     HTMLTag *parent;
  11. public:
  12.     HTMLTag(char *pp, char *pn);
  13.     ~HTMLTag();
  14.     HTMLTag* GetNext();
  15.     HTMLTag* GetParent();
  16.     void SetNext(HTMLTag *ht);
  17.     void SetParent(HTMLTag *ht);
  18.     char* GetTag();
  19.     char* GetFullTag();
  20.     bool Get(char *name, char *out);
  21.     void SetText(char *s);
  22.     char* GetText();
  23. };
  24.  
  25. class HTMLParser{
  26. private:
  27.     char *html;
  28.     HTMLTag *hti;
  29.     HTMLTag *htlist;
  30.     HTMLTag *htp;
  31.     void Search(int d = 0);
  32. public:
  33.     HTMLParser(char *src);
  34.     ~HTMLParser();
  35.     void ShowTree();
  36.     HTMLTag* Find(char *path, int d = 0);
  37.     HTMLTag * GetTagList();
  38. };
  39.  
  40. #endif
Advertisement
Add Comment
Please, Sign In to add comment