-
-
Save emchateau/2e42905e624f6fbef56a to your computer and use it in GitHub Desktop.
This function tokenize a string and returns each token in an xml element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0"; | |
(:~ | |
: This function tokenize a string and returns each text item in a <text/> element | |
:) | |
let $string := "test,test,test,test,test" | |
return | |
for $text in tokenize($string,',') | |
return | |
<text>{concat('add some text: ', $text)}</text> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment