Hi, I'm facing an issue that involves using XQuery on XML data stored in a variable. Here is an example of the XML structure:
<channel>
<available>yes</available>
<label>CNN</label>
</channel>
<channel>
<available>yes</available>
<label>BBC</label>
</channel>
....
I need to retrieve values from this XML using conditions such as:
For Channels.Channel
where Channel/availability = yes
And Channels.Channel/Label = «CNN»
Return EXIST(Channels.Channel/Id)
My query is: How can I run XQuery to obtain this ID value and save the result in a JavaScript variable for later use and integration with other systems? If XQuery isn't feasible, please suggest an alternate method to extract variables from this XML.
Thank you!