XmlFormat()

edit

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
string, required
edit

A string or a variable that contains one

Examples

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

See also