serialize

serialize($arg as node()) → xs:string

Arguments

 

$arg

node()

The node (typically a document or element node) to be serialized

Result

xs:string

serialize($arg as node(), $params as node()*) → xs:string

Arguments

 

$arg

node()

The node (typically a document or element node) to be serialized

 

$params

node()*

Serialization parameters

Result

xs:string

Links to W3C specifications

Namespace: http://www.w3.org/2005/xpath-functions

Applies to: XPath 3.0, XSLT 3.0, XQuery 3.0 (if enabled in Saxon: requires Saxon-PE or Saxon-EE)

XPath 3.0 Functions and Operators

Notes on the Saxon implementation

This function is specified in XPath 3.0, and is newly supported in Saxon 9.3, provided XPath 3.0 is enabled. It replaces the Saxon extension function saxon:serialize

Serialization parameters are supplied by a sequence of nodes, in which the node name acts as the name of the serialization parameter, and its string value as the value of the parameter. This mechanism is based on that in an earlier draft of the XPath 3.0 specification: see here