XQuery - concat函数
concat 函数用于连接多个字符串。
语法
concat($input as xs:anyAtomicType?) as xs:string
输入参数
$input - 由逗号分隔的一个或多个输入。
示例
XQuery表达式
let $bookTitle := "Learn XQuery in 24 hours"
let $updatedTitle := concat($bookTitle,",price: 200$")
return
<result>
<title>{$updatedTitle}</title>
</result>
输出
<result> <title>Learn XQuery in 24 hours,price: 200$</title> </result>
验证结果
为来测试上述功能,请把books.xqy(在 环境设置 章节中提及)的内容替换为上述XQuery表达式并执行XQueryTester java程序以验证结果。
xquery_string_functions.htm
广告