How do I escape double quotes in attributes in an XML String in T-SQL?
Wouldn’t that be " in xml? i.e. “hi "mom" lol” **edit: ** tested; works fine: declare @xml xml set @xml=”<transaction><item value=”hi "mom" lol” ItemId=”106″ ItemType=”2″ instanceId=”215923801″ dataSetId=”1″ /></transaction>” select @xml.value(‘(//item/@value)[1]’,’varchar(50)’)