Wednesday, March 28, 2012

How to use xslt with tsql ?

If Im within a tsql stored procedure, is there a way to use xslt on an xml type ?

Lets say I have an xml string that im reading in as a stored procedure parameter. This string has an attribute on the parent element. Based on this parent element, id like to load the specific xslt transform which could be in another table. What im wondering however, is how to use xslt without calling out to a clr procedure.

help?

You couldn't use XSLT in current version of SQL Server. xml data type support only XQuery/XPath statements now.

But you could XQuery statements as a replacement of XSLT (of couse, for simple cases)

|||

Well, actually I should have posted this in the SSIS forum, because thats where im trying to do this. And it appears that i should be using the xml task

http://msdn2.microsoft.com/en-us/library/ms141055.aspx

sql

No comments:

Post a Comment