Re: [xml] Why do the HTML SAX Parsers build trees?

On Fri, Jun 29, 2001 at 11:11:53AM -0700, Larry Stamper wrote:
Since  one of the main motivations for using SAX-style parsing is to
avoid the expense of building a tree representation of the markup
language, I am wondering why the libxml HTML parser builds a tree
anyway. It seems to at least partially defeat the purpose of having a
SAX parser.

  I think you probably misunderstood something or didn't report your problem
clearly. IMHO you are wrong:

orchis:~/XML -> ./testHTML --sax test/HTML/wired.html > /dev/null
orchis:~/XML -> cat .memdump 
      09:30:03 PM

      MEMORY ALLOCATED : 0, MAX was 23071
orchis:~/XML -> ./testHTML test/HTML/wired.html >& /dev/null
orchis:~/XML -> cat .memdump 
      09:30:18 PM

      MEMORY ALLOCATED : 0, MAX was 192842
orchis:~/XML -> 

   Seems to me that the HTML parser when using SAX works with
a constant amount of memory more or less. Please be more specific
because your report is not useful in its current form.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine
Sep 17-18 2001 Brussels Red Hat TechWorld

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