/* htmlparse.cc
*
* Read html files and generates a tag tree structure.
The copyright for the following is held by Neil Nelson but may be copied or modified
by Jure Sah for the purpose of automating or increasing the HTML item extraction
ability of the MMS or MesonAI related objectives of which Neil Nelson is a part.
*/
#ifndef _HTMLPARSE_H_
#define _HTMLPARSE_H_
class html_tag
{
public:
html_tag()
{
tagname = tagvalue = tagend = "";
uptag = downtag = righttag = lefttag = 0;
}
~html_tag(){}
string tagname, tagend, tagvalue;
html_tag *uptag, *downtag, *righttag, *lefttag;
private:
};
class Anchor_Tag
{
public:
Anchor_Tag()
{
html_tag_ref = 0;
righttag = 0;
}
~Anchor_Tag(){}
html_tag *html_tag_ref;
Anchor_Tag *righttag;
private:
};
class Html_Tag_Classes
{
public:
Html_Tag_Classes()
{
top_tree_tag = 0;
top_anchor_tag = 0;
}
~Html_Tag_Classes() {}
html_tag *top_tree_tag;
Anchor_Tag *top_anchor_tag;
private:
};
class stack_html_tag
{
public:
stack_html_tag()
{
prev_stack_html_tag = 0;
st_html_tag = 0;
}
~stack_html_tag() {}
stack_html_tag *prev_stack_html_tag;
html_tag *st_html_tag;
private:
};
class Match_Tag_Name
{
public:
Match_Tag_Name()
{
tagname = tag_type = "";
optional = prior_tag = 0;
skip_tags = -1;
match_tag = 0;
}
~Match_Tag_Name(){}
string tagname;
string tag_type;
// L = link, N = name, D = description, # = number,
// B = bypass group if present, do not add any tags into skip_tags
// A = use tag after this group
int optional, skip_tags, prior_tag;
html_tag *match_tag, after_group_tag;
private:
};
#endif /* _HTMLPARSE_H_ */