xquery get node value

EMPAPEAPPOG

New Member
I'm trying to get value of but it retuns me null. Please, help me to get this value. Thanks in advance!\[code\]DECLARE @xml XML SET @xml = '<cat:catalog xmlns:cat="http://datypic.com/cat" xmlns:prod="http://datypic.com/prod"> <cat:number>1446</cat:number> <prod:product> <prod:number>563</prod:number> <prod:name prod:language="en">Floppy Sun Hat</prod:name> </prod:product></cat:catalog>'Select @xml.value('declare namespace ns="xmlns:cat=http://datypic.com/cat"; /ns:cat[1]/number[1]', 'int')\[/code\]
 
Back
Top