XML Output is Truncated in SQL
Try the following:
Declare @xmldata xml
set @xmldata = (select ... From test for xml...)
select @xmldata as returnXml
I've had the same problem with management studio and xml result sets. I've solved this by getting the output programatically with c#, with SqlDataReader.