--- title: "escapeXML" description: "Returns the given string after being escaped to be valid for inclusion in XML." --- # escapeXML > Returns the given string after being escaped to be valid for inclusion in XML. **This function is used by Ignition's Expression language.** ## Description Returns the given string after being escaped to be valid for inclusion in XML. This means replacing XML special characters with their XML entity equivalents. ## Syntax `escapeXML(string)` ### Parameters | Type | Parameter | Description | |---|---|---| | String | `string` | The starting string. | ### Results **String** - A string that has been escaped for XML. ## Examples ```python title="Code Snippet" escapeXML("Use Navigate > PB to get to the Pork&Beans section.") //returns "Use Navigate > PB to get to the Pork&Beans section. ```