# fn:string - XPath XQuery Reference

Returns the value of $arg represented as an xs:string.deterministiccontext-dependentfocus-dependentdeterministiccontext-independentfocus-independentIn the zero-argument version of the function, $arg defaults to the context
            item. That is, calling fn:string() is equivalent to calling
               fn:string(.).If $arg is the empty sequence, the function returns the zero-length
            string.If $arg is a node, the function returns the string value of the node, as obtained using the
                     dm:string-value accessor defined in  (see ).If $arg is an atomic value, the function returns the result of the expression $arg cast
                     as xs:string (see ).In all other cases, a dynamic error occurs (see below).string(23)"23"string(false())"false"string("Paris")"Paris"string((1, 2, 3))string([[1, 2], [3, 4]])string(abs#1)
<para>In a hole in the ground there lived a <term author="Tolkien">hobbit</term>.</para>string($para)"In a hole in the ground there lived a hobbit."A dynamic error is raised  by
            the zero-argument version of the function if the context item is absent. A type error is raised  if
               $arg is a function item (this includes maps and arrays).Every node has a string value, even an element with element-only
            content (which has no typed value). Moreover, casting an atomic value to a string always
            succeeds. Functions, maps, and arrays have no string value, so these are the
            only arguments that satisfy the type signature but cause failure.