'Re: "Re: [xml] when to use initialization"'



Hi,

Daniel Veillard wrote:

On Thu, May 08, 2003 at 02:35:45PM +0200, Kasimier Buchcik wrote:

Hi,

I've looked at the initialization and cleanup functions like 
"xmlInitParser()" and "xmlCleanupParser".

I would be glad if someone could answer me the following:

  1. If I *don't* use libxml2's thread-support do I have to call
     xmlInitParser() only once per application or once per parsing?


   You don't even need to call it. It's done automatically, it's just better
to do it explicitely in a thread environment.


  2. If I use libxml2's thread-support do I have to call xmlInitParser()
     once per initial thread entry? Or still just once per application?
     Or once per parsing?


   Once per application. At the beginning.


  3. Do I have to call "xmlCleanupParser" only once per application?


   Yes


  4. Do we need to call any other initialization of cleanup functions if
     using the thread-support?


   No, xmlInitParser() names is not really proper anymore it actually
inits the full library.

Daniel


Thanks, that made things clear to me :-)

Kasimier Buchcik

PS: Is it a waste of recources if one has nothing else to reply than a 
"thank you" on this mail list? Actually I never know whether to send a 
mail or not, if I just want to say that I'm happy with the answer.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]