Consider I have the following data:
let $fruits := <fruits>
<fruit id="apple" />
<fruit id="orange" />
</fruits>
how can I use the data in variable $fruits and parse it to become $fruits2 := ('apple', 'orange')?
I have fn:tokenize function in my mind but this only work with string.
Thanks in advance for any helps.