W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

Re: HTML Parser

From: Alex Guryanow <gav@nlr.ru>
Date: Thu, 19 Aug 1999 17:43:53 +0400
Message-ID: <37BC0A19.3FB9269E@nlr.ru>
To: henni <henni@diefirma.de>
CC: www-lib@w3.org
henni wrote:

> I am totally confused by this library.
> Is it not possible, just to use the HTML-Parser Module to parse a simple
> text, if this text is saved in a simple C-String?
> Is it really not possible?
> I don't know what todo.
> Thanks for any help,
> Thorsten


Yes, this is possible. I'm not sure that my method is quite right, but it
works. You must make the following:

- create the appropriate callback functions (see for example showtags.c,
showlinks.c, showtext.c files from the library) and register they in the
- create new stream (say MyStream), that can parse the html-doc (I use the
function HTMLPresent(...) )
- then use the the method of this stream:
    (*MyStream->isa->put_block)(MyStream, buff, buff_len ),
where buff is your C-String, and buff_len is its length

Received on Thursday, 19 August 1999 09:43:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:51 UTC