SQL 2005 – XML parsing… illegal xml character

  You may run into an error when using SQL 2005 and a .NET 2.0 aspx or windows client UI.   Perhaps you’ve encoded your xml – you are using stored procedures and proper sqlParameters and everything – yet you still run into this exception.   Example repro: DECLARE @xml xml SET @xml = N'<A>&#x2;</A>’…

1