That seems weird...are you using progressive parse? It looks like there
could be holes there... but parse() looks pretty solid...
void DOMParser::parse(const InputSource& source, const bool reuseGrammar)
{
// Avoid multiple entrance
if (fParseInProgress)
ThrowXML(IOException, XMLExcepts::Gen_ParseInProgress);
try
{
fParseInProgress = true;
fScanner->scanDocument(source, reuseGrammar);
fParseInProgress = false;
}
catch(...)
{
fParseInProgress = false;
throw;
}
}
How could it not reset the flag?
Jim
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 28, 2001 12:14 PM
> To: [EMAIL PROTECTED]
> Subject: Re: parse(file.xml) in progress or not ?
>
>
> "Murphy, James" <[EMAIL PROTECTED]> writes:
>
> > If you are multithreaded (which I assume given your
> question) cache the
> > parser on a per thread basis. If are you worried about
> re-entrancy in a
> > single thread parse will throw an exception on subsequent
> calls if there is
> > a parse happening. (fParseInProgress flag)
>
> Hey Jim,
>
> I have a related problem, which is I am attempting to resuse a single
> parser instance in my XMLCONF test suite. I parse each xml snippet,
> and then parser->reset() afterwards. However this does not appear to
> work if an exception occurred during parsing. The parser seems to be
> in some state where it refuses to be reset, and so a further call to
> parse() causes a parse in progress exception.
>
> How does one go about properly resetting the parser after errors,
> and/or how does one cancel a parse in progress?
>
> Cheers,
> jas.
>
> ---------------------------------------------------------------------
> 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]