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)
Jim > -----Original Message----- > From: Frédéric MILLET [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 28, 2001 10:20 AM > To: [EMAIL PROTECTED] > Subject: parse(file.xml) in progress or not ? > > > [Question] > > How can I be sure that a parse is not any more in progress ? > It is to use this method more than once in my application on > different files > > [/Question] > ==---------------- > void SAX2XMLReader::parse ( const InputSource & source ) > Parse an XML document. > > The application can use this method to instruct the SAX > parser to begin > parsing an XML document from any valid input source (a > character stream, a > byte stream, or a URI). > Applications may not invoke this method while a parse is in > progress (they > should create a new Parser instead for each additional XML > document). Once a > parse is complete, an application may reuse the same Parser > object, possibly > with a different input source. > > > --------------------------------------------------------------------- > 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]