[xml] libxml2 SAX parser and predefined entities



Hello,

by experimenting with libxml2's (2.3.6) SAX parser and predefined entities I 
discovered this interesting behaviour, which seems to be a "side effect" : 
if within the callback function called by the parser when it encounters an 
entity I call xmlGetPredefinedEntity,  then the parser also executes the 
callback called when characters are read, with the "real text" of the entity 
(that is, "&" instead of "&" and so on), if I don't call 
xmlGetPredefinedEntity instead the characters callback is not called.

Is this the wanted behaviour or is it a "side effect" ? I'm asking this to be 
sure that I'm not relying upon something that may be subject to changes in 
the future.

TIA

--
Bye,
        Fabrizio Ammollo




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