PrivateBooleanGettexthelper (stringbufferSB,NodeNode,
BooleanAbortonnestedanchors,
IntAnchordepth){
If("Script". equalsignorecase (node. getnodename ())){
ReturnFalse;
}
If("Style". inclusignorecase (node. getnodename ())){
ReturnFalse;
}
If(Abortonnestedanchors&&"A". inclusignorecase (node. getnodename ())){
Anchordepth ++;
If(Anchordepth>1)
ReturnTrue;
}
If(Node. getnodetype ()=Node. comment_node){
ReturnFalse;
}
If(Node. getnodetype ()=Node. text_node){// Node is the content contained in the parsed webpage source file.
// Node. text_node: the node belongs to the text node <body> <div> <Href> <TD> and other labels
//CleanupAndTrimTheValue
StringText=Node. getnodevalue ();// Get the text content in the node, which is equivalent to removing the HTML Tag
Text=Text. replaceall ("// s+ ","");
Text=Text. Replace ("【","");
Text=Text. Replace ("]","");
Text=Text. Replace ("[","");
Text=Text. Replace ("]","");
Text=Text. Replace ("| ","");
Text=Text. Replace ("success ","");
Text=Text. Replace ("? ","");
Text=Text. Replace ("? ","");
Text=Text. Replace ("? ","");
Text=Text. Replace ("| ","");
Text=Text. Replace (",","");
Text=Text. Replace ("-","");
Text=Text. Replace ("~ ","");
Text=Text. Replace ("! ","");
Text=Text. Replace ("@","");
Text=Text. Replace ("#","");
Text=Text. Replace ("$ ","");
Text=Text. Replace ("^ ","");
Text=Text. Replace ("*","");
Text=Text. Replace ("(","");
Text=Text. Replace (")","");
Text=Text. Replace ("% ","");
Text=Text. Replace ("> ","");
Text=Text. Replace ("? ","");
Text=Text. Replace ("% ","");
Text=Text. Trim ();
Temp=Node. getparentnode (). tostring ();// Obtain the label of the parent node
If(Text. Length ()>0&&Temp. indexof (":")=-1){// If it belongs to <Href>, filter...
If(Sb. Length ()>0)SB. append ('');