October 24, 2007 at 12:40 pm
We have a XML file,
declare @xml xml,@xml_with_new_namespace
set @xml =
'
'
set @xml_with_new_namespace=
'
'
below query works:
select @xml_.value('(/root/child)[1]','varchar(50)')
below query doesnt works:
select @xml_with_new_namespace_.value('(/root/child)[1]','varchar(50)')
Why?
October 24, 2007 at 1:00 pm
set @xml =
" '
'"
@xml_with_new_namespace
" '
'"
October 25, 2007 at 1:43 am
try this ....
DECLARE @xml xml,@xml_with_new_namespace xml
SET @xml = '
'
set @xml_with_new_namespace = '
'
select(@xml.value('(/authors/author/first-name/@FName)[3]','nvarchar(32)') )
select(@xml_with_new_namespace.value('(/authors/author/first-name/@FName)[3]','nvarchar(32)'))
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply