May be this would better describe your Concern. You can use "Nodes" method of XML Datatype in SQL like :
DECLARE @xml XML
SET @xml = '<testData><id><![CDATA[112233]]></id><id><![CDATA[445566]]></id></testData>'
select x.y.query('.')
from @xml.nodes('testData/id') x(y)
select x.y.value('.', 'NVARCHAR(MAX)')
from @xml.nodes('testData/id') x(y)
Please "Mark As Answer;", if this Post helps you.
Visit My Blog
kuber.manral
Contributor
3051 Points
714 Posts
Re: Problem in using & using in CDATA
Mar 20, 2012 11:30 AM|LINK
Hi,
May be this would better describe your Concern. You can use "Nodes" method of XML Datatype in SQL like :
DECLARE @xml XML SET @xml = '<testData><id><![CDATA[112233]]></id><id><![CDATA[445566]]></id></testData>' select x.y.query('.') from @xml.nodes('testData/id') x(y) select x.y.value('.', 'NVARCHAR(MAX)') from @xml.nodes('testData/id') x(y)Visit My Blog