I have a column of type varchar(max) populated with xml nodes and values; as an example, the column data starts with
Cast the column to XML (or change it in the table to XML) and shred the xml on //*
to get all nodes in a table. Then you can use for xml path
to concat the values back together.
select (
select ' '+X.N.value('text()[1]', 'varchar(max)')
from (select cast(T.XMLCol as xml)) as T1(XMLCol)
cross apply T1.XMLCol.nodes('//*') as X(N)
for xml path(''), type
).value('substring(text()[1], 2)', 'varchar(max)')
from T
SQL Fiddle