General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
In case you're interested, one answer to this (although not the most straightforward IMO) is to wrap a CDATA tag around all elements where spacing matters. Therefore, to get your example to work, the following would work:
DECLARE @xml nvarchar(4000)
DECLARE @h int
SET @xml = '
SO ME
DATA ]]>
'
EXECUTE sp_xml_preparedocument @h output, @xml
SELECT * FROM OPENXML(@h, '//row') WITH (id int '@id', note nvarchar(2000) 'text()')
execute sp_xml_removedocument @h
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only