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
BLOCK  NUMBER   SIZE  TYPE
orchis:~/XML -> ./testHTML test/HTML/wired.html >& /dev/null
orchis:~/XML -> cat .memdump 
      09:30:18 PM

      MEMORY ALLOCATED : 0, MAX was 192842
BLOCK  NUMBER   SIZE  TYPE
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

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Sep 17-18 2001 Brussels Red Hat TechWorld http://www.redhat-techworld.com




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