Re: [xml] Entities defined using other entities
- From: christophe barbe <cbarbe obj-sys com>
- To: xml gnome org
- Subject: Re: [xml] Entities defined using other entities
- Date: Wed, 22 Nov 2006 17:21:26 -0500
That makes perfect sense.
The doc http://xmlsoft.org/entities.html only suggests to use
xmlSubstituteEntitiesDefault(). Looking at xmllint source, I found out
that both xmlSubstituteEntitiesDefault and XML_PARSE_NOENT were used.
Also in this document, the second command line has ./tester instead
of ./xmllint.
Thanks for the help and for libxml2,
Christophe
On Wed, 2006-11-22 at 17:15 -0500, Daniel Veillard wrote:
On Wed, Nov 22, 2006 at 04:36:51PM -0500, christophe barbe wrote:
In case somebody else has the same problem,
xmlSubstituteEntitiesDefault() was not helpful but setting
XML_PARSE_NOENT in the third argument of xmlReadFile() did the job.
There is a good explanation for that:
xmlSubstituteEntitiesDefault is based on global variables, changing behaviour
of a shared library using a global variable is evil, simply because you may
not be the only user of that library within a given program. That's why
all the new APIs rely on flags passed to each parser to modify the
behaviour, xmlReadxxx() are part of those new APIs, that's why they won't
be affected by xmlSubstituteEntitiesDefault().
Daniel
--
Christophe Barbe - Software Engineer
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]