XmlFormat()
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
Examples
string = "I like peanut butter & jelly.";
dump(XmlFormat(string)); // I like peanut butter & jelly.
See also
- Formatting
- Strings
- XML
- EncodeForXML()
- EncodeForXMLAttribute()
- EncodeForXPath()
- WriteOutput()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)