Escapes XML special characters in a string, so that the string is safe to use with XML.
xmlFormat(String [, escapeChars])
→ returns string
In this example we demonstrate passing the invalid characters < and & into the xmlFormat() function to make them XML safe.
writeOutput( xmlFormat( '<node>Good & Juicy</node>') );
Expected Result: <node>Good &amp; Juicy</node>
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.