Note : I have escaped the single quote (') character by replacing it with 2 single quotes ('') to make this work!
DECLARE @xmlstring VARCHAR(MAX) DECLARE @idoc int DECLARE @doc xml SET @xmlstring ='' SET @doc = CONVERT(XML,@xmlstring) EXEC sp_xml_preparedocument @idoc OUTPUT, @doc SELECT * FROM OPENXML (@idoc, 'wddxPacket/data/struct', 1) a string -12.456 1998-06-12T04:32:12 10 second element a string -12.456
No comments:
Post a Comment