![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to get the Attribute values "TestAccount1" and "TestAccount2" from the below XML. I can't seem to get the xquery correct in order to get at the value. In my real stuff there are 5,000 Row> elements. Help! Declare @xmlRaw Xml = '<?xml version="1.0" encoding="utf-8"? Report xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://testdom.intrnl.com/quest/dev/v5/SchemaA" devteamblue="false" Possibles Column name="AccountName" / /Possibles Table Row AccountName value="TestAccount1">unwanted</AccountName AccountGroup value="People" / /Row Row AccountName value="TestAccount2">wanted</AccountName AccountGroup value="Places" / /Row /Table /Report>' -- returns null Select xItem.value('(AccountName)[1]','varchar(256)' ) as fff from @xmlRaw.nodes('/') as x(xItem) |
![]() |
| Thread Tools | |
| Display Modes | |
| |