Document nodes
A document node encapsulates an XML document.
A document node can have zero or more children. The children can include element nodes, processing instruction nodes, comment nodes, and text nodes.
The string value of a document node is equal to the concatenated contents of all its descendant text nodes in document order. The type of the string value is xs:string. The typed value of a document node is the same as its string value, except that the type of the typed value is xdt:untypedAtomic.
A document node has the following node properties:
- children, possibly empty
- string-value
- typed-value
Document nodes can be constructed in XQuery expressions by using computed constructors. A sequence of document nodes can also be returned by the db2-fn:xmlcolumn function.