#include"script.h" int main() { system( "curl -o test.html http://sourceforge.net" ); Str buf; loadFile( "test.html", buf ); HTMLData htmld1, htmld2; htmld1( buf, 1 ); // read all text between tags (even empty or all made from white chars) htmld1.checkTags(); // check tags for some errors printHTMLData( htmld1 ); // print html data with showing positions of components in buf htmld2( buf, 0 ); // read html data without blank texts htmld2.checkTags(); printf( "\n +++ MODE WITHOUT BLANK TEXTS +++ \n\n" ); printHTMLData( htmld2 ); Str a, b; a = htmld2.texts[ 0 ].text; // a contain first text string from html b = htmld2.tags[ 1 ].text; // b contain second tag text uint p = htmld2.tags[ 1 ].pos; // p is position of second tag in buf }