![]() It follows a basic syntax as other programming languages. Various functions are used either in-built or customized to meet the requirements. In this era of connectivity where XML documents are being passed with other applications establishing a data linkage. It is a powerful tool to display or update data on the go. XQuery is one of the standard data extraction functional programming logic. This function works to take input as a string and returns output in string format only.Ĭoncat($input_string as xs:anyatomictype?) as xs:string Conclusion fn: concat($input as xs:anyatomictype?) as xs:string: This function takes two or more strings and concatenates them to output a single concatenated string. If the value after the decimal is 5 or more then the decimal value is rounded up to the nearest high integer value while for decimal numbers less than 5, they are rounded to the nearest small integer number. fn:round(3.14)= 3, This function rounds up the value to the nearest integer. fn:return(), This function is used to return the output of any function. fn:round-half-to-even(number): Rounds up the number to reach the nearest even number.Ģ3. fn:nilled(node): Returns boolean value indicating if the node is nil or not.Ģ2. fn:base-uri(node): For the passed node, base-uri is picked up and provided as a result of this function.Ģ1. fn:base-uri(): For the passed node, base-uri is picked up.Ģ0. fn:document-uri(node): For the passed node, document-uri is picked up and provided as a result of this function.ġ9. Current-time(): This function returns the current time as per the system time configured.ġ8. Current-date(): This function returns the current date as per the system date configured.ġ0. fn:not(argument): This function returns the reverse of the argument passed in boolean format.ĩ. fn:false(): This function returns false.ħ. We can pass 23 as string or number after storing it as a variable.Ħ. For ex: boolean(23), gthis function returns true as it has some value. ![]() This function just determines if there exists any object or not. This function returns true or false based on any input number, string or node. If there is any number then it returns true otherwise false. fn:boolean(5)=True, This function returns the Boolean value. String-length($input_string as xs:string) as xs:integerĥ. 27 is the number of characters passed as a parameter to this function. This function will return an integer value 27. For example: string-length($WhatIsTheLengthOfThisString as xs:string) as xs:integer. This is useful function when we want to iterate through the string characters as per our program requirements. So we can pass any string into this function and get the number of characters inputted in the string. fn:string-length($any_string as xs:string) as xs:integer, This function returns the number of characters in the string specified. Such functions are required when we want to have only integer values in our program.Ĥ. ![]() ![]() In this case 3.14 is converted into 3 as it is the nearest lower integer. This works similar to the previous function but the difference is that it converts any decimal value to the nearest lower integer value. fn:floor(3.14)= 3, returns greatest integer lesser than number passed. In this case 3.14 is nearest to 4 integer.ģ. In the above example we irrespective of any value we put which has values in decimal format, we get the nearest high integer. fn:ceiling(3.14)= 4, This function returns the smallest integer greater than the number passed.
0 Comments
Leave a Reply. |