On 12/11/2010 16:38, Costello, Roger L. wrote:
> My understanding is that an XML document is first processed by an XML parser, which creates an in-memory tree representation of the XML document.
not necessarily it may return some other representation, or it may just
stream events notifying the application. Most parsers do not (as far as
I know) generate an XDM tree for example but rather the xslt or xquery
engine uses a sax parser and (perhaps) builds the tree from those sax
events.
But perhaps the full tree is never built at all if the system can tell
at compile time that only parts of the document are used, other parts
may be simply parsed enough to skip over without actually building an in
memory tree at all.
David