Limitations

Even with the new features in the forthcoming Web Release 1, SQL Server's XML support has some fundamental limitations that make it difficult to use in certain situations. In this section we'll explore a couple of these and look at ways of working around them.

sp_xml_concat

Given that sp_xml_preparedocument accepts document text of virtually any length (up to 2GB), you'd think that SQL Server's XML facilities would be able to handle long documents just fine, but this is not the case. Although sp_xml_preparedocument's xmltext parameter accepts text as well as varchar parameters, the problem is that Transact-SQL doesn't support local text variables. About the closest you can get to a local text variable in Transact-SQL is to set up ...

Get Guru's Guide to SQL Server™ Stored Procedures, XML, and HTML, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.