Re: [xml] TextReader vis-a-vis SAX



On Wed, Aug 29, 2007 at 06:50:53PM +0530, harbhanu wrote:
What libxml2 creates is a sliding window over the full document. It
contains the current node and its ancestors. That's the only guarantee
So, by this does it means that a document with only one nesting will have
the complete document in memory...
For ex....
      <a><ab><abc><abcd>. ..... </abc></abcd></ab></a>
In this case its memory requirement will be almost equivalent to DOM.
Right??

  yes, stupid design leads to stupid problems, I don't care too much
about it.

Can schema validation, using reader, be done on the stream also, like the
one expected from API xmlSchemaValidateStream?

  yes, hum, that was added after I made that documentation. 
xmlTextReaderSchemaValidate() used for example in xmllint if you
do a combination of --schema and --stream , see streamFile()
in xmllint.c

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



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