Ben_Lidgey
16 years agoOccasional Contributor
How to select attribute using Xquery in property transfer
Hi,
I'm want to use a property transfer to transfer an attribute. I get many attributes back, but only want the one specified in a string.
{possible fruitId's are 'ORANGE', 'APPLE', 'PEAR' }
so I need to iterate through the response and extract the fruit attribute
Not having any success with the following:
declare namespace ns5='http://example/example/example/example/example';
declare namespace ns6='http://example/platform/example/example/example';
for $x in //ns5:getAvailablefruitsResponse/ns5:fruitType
where $x/ns6:fruit[@fruitId="APPLE"]
return $x//ns6:[@fruitId]
Any ideas please....tearing my hair out!
I'm want to use a property transfer to transfer an attribute. I get many attributes back, but only want the one specified in a string.
{possible fruitId's are 'ORANGE', 'APPLE', 'PEAR' }
so I need to iterate through the response and extract the fruit attribute
Not having any success with the following:
declare namespace ns5='http://example/example/example/example/example';
declare namespace ns6='http://example/platform/example/example/example';
for $x in //ns5:getAvailablefruitsResponse/ns5:fruitType
where $x/ns6:fruit[@fruitId="APPLE"]
return $x//ns6:[@fruitId]
Any ideas please....tearing my hair out!