1.15.3 Specifying an XQuery

Organization of this subsection
(1) Function
(2) Format
(3) Example

(1) Function

Specifies a query for an XML type value.

An XQuery query can be specified as a character string literal in the following places:

(2) Format

XQuery ::= XQuery-declaration XQuery-query-body

(3) Example

Declare the default XML namespace in XQuery-declaration. Define the result of the XQuery query inside XQuery-query-body.

declare default element namespace 'http://www.aaa.com' ;  ... XQuery declaration

/bookinfo/book/price/child::text()               ... XQuery query body