How to define functions in XQuery ?

 Posted by Bharathi Cherukuri on 5/11/2012 | Category: Web Services, Remoting Interview questions | Views: 2269 | Points: 40

XML has many build-in functions. XQuery functions generally made perform with string values, numeric values, date and time comparisons, boolean values etc.
XQuery give us the facility to made our own functions.
Here are some of the ways, how to call XQuery functions:

Ex 1: When you use function in an element.

Ex 2: When you use function in the predicate of a path expression.

Ex 3: When you use function in a let clause
let $name := (substring($booktitle,1,4))

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response