fnMFRemoveIllegalXMLCharacters

Signature

dbo.fnMFRemoveIllegalXMLCharacters(
    @Input NVARCHAR(MAX)
)

Returns

  • NVARCHAR: the input string with characters illegal in XML removed.

Parameters

  • @Input NVARCHAR(MAX) (required) - The character string to sanitize.

Purpose

Remove characters not allowed by XML (e.g., certain control characters) to produce XML-safe text.

Examples

SELECT dbo.fnMFRemoveIllegalXMLCharacters(N'Text with \u0001 control') AS Sanitized;

Changelog

Date

Author

Description

2025-06-13

LC

Create function