|
What Bruno says makes sense. A SAX pipeline is
actually just a sequence of classes, each one invoking methods of another
one.
For instance:
SaxParser->ContHandler1->ContHandler2->...->ContHandlerN
If ContHandler1 invokes endDocument(), all this
does is call this method in ContHandler2. ContHandler1 is free to do this at any
time.
But that has absolutely no implication at all to
the SaxParser. The SaxParser is totally oblivious to what happens down the
line.
The SaxParser will continue parsing the source XML,
identifying tokens and invoking ContHandler1's methods.
Of course, if ContHandler1 invokes endDocument()
twice, this will most likely result in an exception, but that's because
ContHandler was not coded correctly.
What I thought was that there could be somewhere a
"back door" that ContHandler could signal SaxParser to stop, but that does
not seem to exist.
Unless any of the ContHandlerX throws an exception
(which might be the way to go, at least in my own application).
Thanks,
jlerm
|
- Stopping a SAX parser jcplerm
- Re: Stopping a SAX parser Jorg Heymans
- Re: Stopping a SAX parser David Kavanagh
- Re: Stopping a SAX parser Bruno Dumon
- Re: Stopping a SAX parser David Kavanagh
- Re: Stopping a SAX parser jcplerm
- Re: Stopping a SAX parser jcplerm
- Re: Stopping a SAX parser Bruno Dumon
