I have coded around the issue of getting a parser in a funky state by caching a pool of them and "checking one out" of my pool prior to use. If all goes well I check it back in, if something bad happens I delete it. Keeps our server pretty robust.
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]
