This one seems so simple, but I must be missing something...
Given this SQL:
declare @xml XML
set @xml =
'<people>
<person>
<name>Matt</name>
<surname>Smith</surname>
<person>
<person>
<name>John</name>
<surname>Doe</surname>
<person>
</people>'
How would you go about getting a table containing:
people
----------------------------------------------------------------------
<person>\n <name>Matt</name>\n <surname>Smith</surname>\n <person>
<person>\n <name>John</name>\n <surname>Doe</surname>\n <person>
ie: Grabbing entire nodes as nvarchar(NNN) elements, not just their names, attributes or values?
I've tried using node(), text(), fn:node(), fn:text(), blah blah etc... Nuffin yet!