[Expat-discuss] XML_SetDefaultExpandInternalEntities?
Karl Waclawek
karl at waclawek.net
Thu Feb 21 01:05:44 CET 2008
Mikhail T. wrote:
> Hello!
>
> I'm trying to port a piece of software (tclxml's tclexpat.c) to use the modern
> expat-2.x instead of the ancient version, that's bundled with tclxml.
>
> It almost works already, except for the missing function:
>
> XML_SetDefaultExpandInternalEntities()
>
> tclxml is supposed to allow to alter an existing parser switching the
> expansion of entities on and off on the fly:
>
> case EXPAT_DEFAULTEXPANDINTERNALENTITIES:
> if (Tcl_GetBooleanFromObj(expat->interp, valuePtr, &bool) != TCL_OK) {
> return TCL_ERROR;
> }
> XML_SetDefaultExpandInternalEntities(expat->parser, bool);
> break;
>
> Unfortunately, the function is not present in the expat-2.0.0 -- it used to
> follow XML_SetDefaultHandlerExpand (which is still there) in xmlparse.c.
>
> What's the right replacement? Thanks!
>
If you read the docs (reference.html) about XML_SetDefaultHandler() and
XML_SetDefaultHandlerExpand(),
you might find a way to duplicate the old logic.
Karl
More information about the Expat-discuss
mailing list