Looking to achieve the following:
Running a dynamic XQUERY stored in a JavaScript variable example
var myxquery = For Channels.Channel
where Channel/availability = yes
And Channels.Channel/Label = 'CNN'
Return EXIST(Channels.Channel/Id)';
var xmltoparse= '<channel>
<available>yes</available>
<label>CNN</label>
</channel>
<channel>
<available>yes</available>
<label>BBC</label>
</channel>'
This involves executing the myxquery
variable against the xmltoparse
variable and saving the result of the XQUERY in another variable.
Is this achievable?