Re: can I know how to write a html parser in C

From: WUV999U (usbharath.ganesh_at_gmail.com)
Date: 02/28/05


Date: 27 Feb 2005 19:09:29 -0800


/**************HTML PARSER*************/

void htmlparse(FILE *);

int main(int argc, char * argv[])
{

     FILE * op;
     op = fopen(argv[1],"r");
     if (op == NULL)
        {
            printf("Error opening file\n");
            exit(0);
        }

    htmlparse(op);
    return 1;

}

void htmlparse(FILE * op)
{
    char line[81];
    char images[250];
    if (fgets(line,81,op) == NULL)
      {
        printf("Error reading data");
        exit(0);
      }

    puts(line);

    if(line == "<img src")
      {

------------------
well,, thats all i hav......... and m stuck here...