Re: [xml] HTML push interface

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Tue Aug 01 2000 - 18:03:02 EDT


On Tue, Aug 01, 2000 at 02:36:30PM -0400, Marc Sanfacon wrote:
> Hi there,
> I am new to libxml (I've been using it for less than 1 week). I
> have written a C++ interface on top of it. It is not yet finished, but it
> includes most features I need for now. BTW, I am working under Windows 2000
> using MSVC 6.0 SP3.

  Could you give the precise version you're using ?
Did you tried with one very recent version or the CVS snapshot ?

> I have tried to parse a file using the html push interface and have
> strange results.

> This is mainly the code presented in 'testHTML.c' from the package, except
> that I use a bigger buffer. In my tests, one strange thing happened. When
> using a buffer large enough to fit one of my document, the result of the
> parsing is not complete. For now, I have only one document that does this
> effect and I have attached it to this email.

  Well, I just modified my testHTML.c to use a 4096 bytes buffer,
force it to read 4096 bytes at a time and reran make HTMLtests .
This test uses files with varying sizes from 150bytes to 40000 bytes
and this worked perfectly.

> For example, the document is 2001 bytes long. When reading using fread, it
> strips the '\r' so this gives a total of 1971 bytes. When I put 1967 (1971
> - 4 bytes for the header) or more, I get the error, a big chunk from my
> document is skipped, but if I put 1966 or less, the document is parsed OK.
>
> I even modified 'testHTML.c' to use buffer of 1967 bytes to ensure I was OK,
> and I had the same error using: testHTML -debug -repeat -push doc2.htm

  However your document raises the same problem on my environment
so I will have a look at it and try to pinpoint and fix the problem.

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe
----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:25 EDT