[Expat-discuss] external entities

Karl Waclawek karl at waclawek.net
Wed Apr 14 20:03:17 EDT 2004


----- Original Message ----- 
From: "GoochRules!" <goochrules at hotmail.com>
To: <expat-discuss at libexpat.org>
Sent: Wednesday, April 14, 2004 5:17 PM


> Greetings,
> 
> I have an XML document that contains &quot;s and &amp;s within 
> attribute nodes that seem to be converted to "s and &s by the time they 
> get to my start element handler.

That is how it is supposed to work.
 
> Is there any way to avoid this?  My current solution is to check every 
> attribute value returned by expat and to undo the conversion.  It 
> appears that through the use of the XML_*ExternalEntity* functions I 
> can stop the conversion, but I have been unable to figure out how to 
> properly use these functions.

No, these are internal entities, you can't easily turn their expansion off.
Check the docs on SetDefaultHandler and SetDefaultHandlerExpand.
Maybe these can help you.

Karl




More information about the Expat-discuss mailing list