Re: [xml] push mode

On Fri, Mar 09, 2001 at 02:55:07PM +0100, Luca Padovani wrote:
I wonder if there is a clean way to use the "push method" with any kind of
document. The example in the home page shows how this can be done with a
regular file, but what if I have a URI?
I guess this has something to do with xmlParserInput and
xmlParserInputBuffer, but it is still not clear to me exactly how.
Any help?

  Well if you want to use the push mode you obviously want to
control the flow of data, right ? Which mean you want to keep
to control of what comes from a connection resulting of an URI.
Basically your program loop open the URI (check nanoftp and
nanohttp modules if needed) and then use low level promitive to
read the data block by block when available, and push it to the
parser. The only different is that instead of reading from a file
you read from a network pipe.
  If you create an xmlParserInput with the URL you loose the
the control because the parser will keep the reading/parsing
loop internally.

 makes sense ?


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]