AW: Question about usage of HText-Callbacks - Have a very specific problem ...

Hey, Raffaele !

Thanx for your answer.

>     If you set the right callback (see libwww/Library/Examples/showtags.c)
>     you will be called for the open and close tag, with parameters
> specifying
>     which tag is being processed (as an enumerated that you can use to
> access
>     tag specific information) and its attributes.
Yeah that's right. I get all the information attached to this specific tag.
But this call to the callback is a kind of stateless. I've to convert the
HTML-page into another kind of language similar to HTML but much simpler.
This language have to be transferred to an interpreter via a defined
memory structure. This structure must be filled.
Therefor I've to store the plain text surrounded by specific tags. By this
time I store this plain-text-information in an allocated memory block
(allocated via malloc) and access this block via a static char**. This is
not very fine programming. Use of global variables is not the best way in
my eyes.
In the endelement-callbackfunction I build the structure and pass it to
the interpreter.
But there's no other way to access these kind of data ?

Some other callbacks e.g. in WIN-32-API allow to pass a void* to any
kind of data structures. In libwww ?

> -- Raffaele
Thanx. RU Michael.


------------------------------
Life's unfair - but root password helps!

Received on Tuesday, 3 August 1999 22:53:17 UTC