XQuery uses input functions to identify the data to be queried. There are two input functions:
TABLE 1.1 Entity References | Character Represented |
Predefined in XQuery Entity Reference | |
< | < |
> | > |
& | & |
" | " |
' | ' |
If our sample data is in a file named books.xml, then the following query returns the entire document:
doc("books.xml")
A dynamic error is raised if the doc() function is not able to locate the specified document or the collection() function is not able to locate the specified collection.
Next Section: Locating Nodes: Path Expressions