Jon <[email protected]> writes:

>> In many cases you don't even need that. Write a shell XML file,
>> 
>> <!DOCTYPE wrapper SYSTEM "the-dtd-file.dtd" [
>>   <!ELEMENT wrapper the-real-root-element>
>>   <!ENTITY the-real-document SYSTEM "bigfile.xml">
>> ]>
>> <wrapper>&the-real-document;</wrapper>
>
> Will the libxml2 implementation try to bring the entire &the-real-document; 
> entity into memory, or will it stream it if I use the SAX2 or Reader API?  My 
> gut tells me both the dtd and the bigfile.xml will be completely parsed into 
> memory. This is fine for the dtd but not for the bigfile.xml.

A reading of xmlParseReference suggests your gut is wrong. :)

http://git.gnome.org/browse/libxml2/tree/parser.c#n6823
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to