Actually, you can set the "continue-after-fatal-error" feature with
any parser, not just XNI. However, keep in mind that the feature
is considered to be defective in its implementation. In particular,
the reason to continue processing after fatal errors is to allow
the parser to report additional errors beyond the first one, not to
continue getting normal document events, which is in violation of
the XML spec. That being the case, creating a dependency on the
defective behavior is not advised.
However, I can see no reason that you could not create a handler
that processed your bulk documents in chunks, allowing it to find
any well-formedness errors in each chunk, and would only need to
go back to the beginning of that chunk to "reparse" the corrected
chunk before going on to the next one.
-Glenn
Aleksander
Slominski To: [EMAIL PROTECTED]
<[EMAIL PROTECTED] cc:
ana.edu> Subject: Re: Sorry 'nother dumb question
10/29/2001
02:10 PM
Please respond
to
xerces-j-dev
Carl Christianson wrote:
> thx that is exactly what I thought (and read in the docs).
> The reason I asked was that I've been tasked with finding a way around
that
> behaviour for a bulk data loading program.
hi,
if you require to do such recovery you will need to rely on ability of XML
parser/undelrying tokenizer
to move on to next token and continue parsing.
if you still want ot find a way around this particular problem without need
to preprocess input XML but
just to do streaming input with error notification you may take a look
Xerces2 XNI pull interface -
when you enable "http://apache.org/xml/features/continue-after-fatal-error"
you will be able to
continue parsing after fatal error.
thanks,
alek
ps. i will send a complete example how to do it drectly to you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]