The concat function is used to concatenate various strings.
concat($input as xs:anyAtomicType?) as xs:string
$input − one or more inputs separated by comma.
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>
In order to test the above-mentioned functionality, replace the contents of books.xqy (mentioned in Environment Setup chapter) with the above XQuery expression and execute the XQueryTester java program to verify the result.