【发布时间】:2011-08-30 08:40:17
【问题描述】:
我需要和java代码一样的xquery结构
string temp
for(int i=0,i<string[].length,i++)
temp=temp+string[i]
例如,在 xquery 中,我有字符串 /a/b/c 我需要类似的东西
let $temp:=""
for $x in tokenize(string,'/')
$temp=concat($temp,$x)
return $temp
它应该在每次迭代时返回以下内容
a
ab
abc
但不知何故,这条语句 $temp=concat($temp,$x) 不起作用。那么执行此操作的正确语法是什么?提前致谢
【问题讨论】:
标签: xquery