That's not at all how the deferred DOM implementation works. No part of
the document is skipped. Deferred DOM defers creation of nodes [1], only
building them as the tree is traversed. The scanner which sits at the
front of the pipeline parses the document and if the document isn't
well-formed it'll report that.
[1] http://xml.apache.org/xerces2-j/features.html#dom.defer-node-expansion
Elliotte Harold <elharo@xxxxxxxxxxxxxxx> wrote on 12/19/2004 05:58:56 AM:
> Curtiss Howard wrote:
>
>
> > For a small file, SAX only had a 20% performance advantage over DOM.
> > I'd expected much more. Surprisingly enough, as I increased the size
> > of the file being parsed, the performance advantage _narrowed_, not
> > widened, as I'd expected. Obviously the parse is going to be somewhat
> > slow due to schema validation, but I'm confused as to why SAX is
> > performing so poorly compared to DOM. Can anyone shed some light on
> > this?
>
> Is it possible you're using the deferred DOM implementation? If so,
> Xerces DOM parser is not actually parsing part of the file until you
> actually walk the tree. That would explain why it seems to speed up with
> larger documents: more to skip. Personally I think this behavior is
> nonconformant to the XML and DOM specifications--it fails to detect
> well-formedness errors as early as required--but others disagree with
me.
>
> --
> Elliotte Rusty Harold elharo@xxxxxxxxxxxxxxx
> XML in a Nutshell 3rd Edition Just Published!
> http://www.cafeconleche.org/books/xian3/
> http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xxxxxxxxxxxxxx
> For additional commands, e-mail: xerces-j-user-help@xxxxxxxxxxxxxx
>
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@xxxxxxxxxx
E-mail: mrglavas@xxxxxxxxxx
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|