Escapes special XML characters in a string, so that the string is safe to use with XML.

EncodeForXML() is the updated version of this function, which uses ESAPI and escapes a wider range of content.

XmlFormat( string=string );

Returns: String

Argument Description
string, required

A string or a variable that contains one


string = "I like peanut butter & jelly.";
dump(XmlFormat(string)); // I like peanut butter & jelly.

See also