fn:doc( [$uri as xs:string*] ) as document-node()*
Returns the document(s) stored in the database at the specified URI(s).
document-node()
returned for each item in the result
contains an element()
root node for XML documents, a
text()
root node for text documents, an
object-node()
, array-node()
, or another JSON node
for a JSON document, and a binary()
root node for binary
documents.
fn:doc("/mydocs/doc.xml") => returns the document at the URI /mydocs/doc.xml