XQUERY: reutrn values from different tags using xquery

Issues related to W3C XQuery.
DevinPomsilina
Posts: 2
Joined: Wed Aug 03, 2022 3:32 pm

XQUERY: reutrn values from different tags using xquery

Post by DevinPomsilina »

I´m starting using xquery and I want to know how to get the values from 2 different type of tags. for example:

xml

<elementType>value</elementType>
<otherElementType>value</elementType>
<elementType>value</elementType>
<elementType>value</elementType>
xquery

"for $b in $doc//elementType return stringg($b)"
"for $b in $doc//otherElementType return stringg($b)"
I want this but only using one query, how can that be done?
artur_bozieac
Site Admin
Posts: 6
Joined: Wed Feb 16, 2022 11:40 am

Re: XQUERY: reutrn values from different tags using xquery

Post by artur_bozieac »

Hello Devin,

A solution for you request can be found on this topic: xquery/topic24729.html.

Best regards,
Artur
Artur Bozieac
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply