I want to read the value in xml returned by a WCF service which gets called by a stored procedure. The code below returns a null:
declare @xmlValue varchar(1000)
declare @responseString varchar(100)
declare @idoc int
set @xmlValue = '<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">220</string>'
EXEC sp_xml_preparedocument @idoc OUTPUT, @xmlValue
SELECT *
FROM OPENXML (@idoc, '/*',3)
WITH (string varchar(100))
EXEC sp_xml_removedocument @idoc