Re: [xml] Differences in DOM parsing on Windows and UNIX?

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
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 Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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