标签:work -- and uri varchar val xmlns namespace XML
declare @x xml
set @x =
‘<Chicago xmlns="http://workshop">
<Area>A1</Area>
<Group>5</Group>
<Question>Q1</Question>
</Chicago>‘
declare @r nvarchar(50)
set @r = @x.value(‘local-name(*[1])‘, ‘nvarchar(50)‘)
--SELECT @x.query(‘local-name(/*[1])‘)
select @r
select @x.value(‘namespace-uri(*[1])‘, ‘nvarchar(100)‘)
随笔- Get Root Element and namespace of xml in mssql
标签:work -- and uri varchar val xmlns namespace XML
原文地址:http://www.cnblogs.com/awcyy/p/6420754.html