Re: [xml] Differences in DOM parsing on Windows and UNIX?
- From: Daniel Veillard <veillard redhat com>
- To: Stéphane Bidoul <stephane bidoul softwareag com>
- Cc: "'Ed Day'" <eday obj-sys com>, xml gnome org
- Subject: Re: [xml] Differences in DOM parsing on Windows and UNIX?
- Date: Sat, 11 Oct 2003 07:12:02 -0400
On Sat, Oct 11, 2003 at 12:59:44PM +0200, Stéphane Bidoul wrote:
If your program has only one thread, you don't need to.
Just have a look at xmllint.c: it only
does xmlKeepBlanksDefault(0) and that does not
depend on LIBXML_THREAD_ENABLED.
[...]
If your program has several threads, either
do xmlThrDefKeepBlanksDefaultValue() before creating
your threads or do xmlKeepBlanksDefault() in each thread.
The proper way post 2.6.0 will simply to use the xmlReadxxx
API and pass the correct flags for this specific parsing.
The use of the global variables are an evil hack, it was the
simplest way at the time, but really that's bad and migrating to
the new APIs is far far cleaner. The xmlReadxxx functions
will *not* use the global variables, per thread or not, it's
quite a saner API, this should avoid this whole mess. When you
parse a document the code launching the parse is the one who
knows what is the expected options, not some initialization step,
previous parsing, external library or concurent thread, who
might have a different need and changed the default.
I actually already migrated xmllint to the new code.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]