top of page

String sicher für Xml/Html codieren / Encode string safely for Xml/Html

(alle Versionen/all versions)

Sonntag, 1. Januar 2023

Simples Beispiel zum sicheren Codieren von Strings für Xml/Html.

A simple example to safely encode strings for Xml/Html.

DECLARE @sValue NVARCHAR(MAX)

SET @sValue = N'This is an <b>example</b> !'

SELECT TOP 1 @sValue FOR XML PATH('')

bottom of page