Re: [xml] external DTD validation of large XML's
- From: Noam Postavsky <npostavs users sourceforge net>
- To: Jon <jon forums gmail com>
- Cc: xml gnome org, Liam R E Quin <liam holoweb net>
- Subject: Re: [xml] external DTD validation of large XML's
- Date: Sun, 10 Jul 2011 18:26:58 -0400
Jon <jon forums gmail com> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]