# xf:number

Converts the value of $node-var (XML element) to a double precision floating point value.

### Signatures

xf:number(xf:node $node-var) —> xs:double

### Arguments

Data Type | Argument | Description
--- | --- | ---
xf:node | $node-var | Represents an XML node.

### Returns

Returns the double precision floating point value of $node-var.

### Examples

#### XML Node

When you invoke the following query:

    {--  node example --}
    let $numnode := <a><b>12.1</b></a>
    return (<num>{xf:number($numnode/b)}</num>)

The following result is generated:

    <num>12.1</num>

Related Topics

W3C number function description