XQuery TutorialLesson 71Free preview
XQuery Syntax
This lesson is part of XML · All levels
Summary
The XQuery syntax is case-sensitive and is written as an XML expression that combines element constructors, XPath, and FLWOR clauses. Queries can be prologues, expressions, or both, and comments are written with the typical XQuery syntax. Query files generally end in .xq or .xquery and are executed by a server or XML database.
Key points
- Case-sensitive: doc() is different from DOC()
- XQuery comments use (: this is a comment:), not <!-- -->
- Strings can be written with double quotes or single quotes.
- Variables are always preceded by the $ sign, e.g. $x and $title
- Prologues are optional; queries may be expressions only
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.