Getting the number of attributes with a given value

I am trying to build XQueryone that will return an account of the found attributes of the numbers that matter x.

This is part of the query SQL, and these calculations will fill in one of the returned columns (this part, which I can find out, is actual XQuery, in order to get an account that I still do not understand).

For example, if I have <element elementattribute=1>...</element>, how would I consider everything @elementattributesequal to 1 for a given fragment XML?

+3
source share
1 answer

you can use an asterisk wildcard for the element name:

Number (// * [@elementattribute = '1'])

Hope this helps ...

+7
source

Source: https://habr.com/ru/post/1726370/


All Articles