escapeXml
function escapeXml(value: string): string;
The same five characters as escapeHtml, for content going into an XML document rather than a page.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The string to convert. It must not be empty. |
Returns
string — the escaped string.
Throws
Exception | Condition |
|---|---|
| the value is not a string, or is empty. |
Examples
Converting
escapeXml("<a>&"); // => "<a>&"
See also
Source
23 September 2026
This documentation was generated with AI (Claude) from the library's source code.