xmlEncodeEntitiesReentrant is available since version 1.0.
Prototype:
string xmlEncodeEntitiesReentrant(number doc, string input)
Parameters
doc
the document containing the string (can be null)
input
a string to convert to XML
Description:
Do a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts.
Return value:
Returns the substituted string.