Add XML_SetEncoding
This commit is contained in:
parent
13594c689a
commit
845dd4dd8b
@ -468,6 +468,18 @@ XML_Parser XML_ParserCreateNS(const XML_Char *encodingName, XML_Char nsSep)
|
||||
return parser;
|
||||
}
|
||||
|
||||
int XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName)
|
||||
{
|
||||
if (encodingName)
|
||||
protocolEncodingName = 0;
|
||||
else {
|
||||
protocolEncodingName = poolCopyString(&tempPool, encodingName);
|
||||
if (!protocolEncodingName)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
XML_Parser XML_ExternalEntityParserCreate(XML_Parser oldParser,
|
||||
const XML_Char *context,
|
||||
const XML_Char *encodingName)
|
||||
|
@ -306,6 +306,13 @@ XML_SetUserData(XML_Parser parser, void *userData);
|
||||
/* Returns the last value set by XML_SetUserData or null. */
|
||||
#define XML_GetUserData(parser) (*(void **)(parser))
|
||||
|
||||
/* This is equivalent to supplying an encoding argument
|
||||
to XML_CreateParser. It must not be called before XML_Parse
|
||||
or XML_ParseBuffer. */
|
||||
|
||||
int XMLPARSEAPI
|
||||
XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
|
||||
|
||||
/* If this function is called, then the parser will be passed
|
||||
as the first argument to callbacks instead of userData.
|
||||
The userData will still be accessible using XML_GetUserData. */
|
||||
|
Loading…
Reference in New Issue
Block a user