untung99.homes: XQuery Syntax
Untung99 menawarkan beragam permainan yang menarik, termasuk slot online, poker, roulette, blackjack, dan taruhan olahraga langsung. Dengan koleksi permainan yang lengkap dan terus diperbarui, pemain memiliki banyak pilihan untuk menjaga kegembiraan mereka. Selain itu, Untung99 juga menyediakan bonus dan promosi menarik yang meningkatkan peluang kemenangan dan memberikan nilai tambah kepada pemain.
Berikut adalah artikel atau berita tentang Harian untung99.homes dengan judul untung99.homes: XQuery Syntax yang telah tayang di untung99.homes terimakasih telah menyimak. Bila ada masukan atau komplain mengenai artikel berikut silahkan hubungi email kami di koresponden@untung99.homes, Terimakasih.
XQuery is case-sensitive and XQuery elements, attributes, and variables must be valid XML names.
XQuery Basic Syntax Rules
Some basic syntax rules:
- XQuery is case-sensitive
- XQuery elements, attributes, and variables must be valid XML names
- An XQuery string value can be in single or double quotes
- An XQuery variable is defined with a $ followed by a name, e.g. $bookstore
- XQuery comments are delimited by (: and :), e.g. (: XQuery Comment 🙂
The XML Example Document
We will use the “books.xml” document in the examples below (same XML file as in the previous chapters).
View the “books.xml” file in your browser.
XQuery Conditional Expressions
“If-Then-Else” expressions are allowed in XQuery.
Look at the following example:
for $x in doc(“books.xml”)/bookstore/book
return if ($x/@category=”children”)
then
else
Notes on the “if-then-else” syntax: parentheses around the if expression are required. else is required, but it can be just else ().
The result of the example above will be:
XQuery Comparisons
In XQuery there are two ways of comparing values.
1. General comparisons: =, !=, <,>, >=,>
2. Value comparisons: eq, ne, lt, le, gt, ge
The difference between the two comparison methods are shown below.
The following expression returns true if any q attributes have a value
greater than 10:
The following expression returns true if there is only one q attribute
returned by the expression, and its value is greater than 10. If more than one q
is returned, an error occurs:
$bookstore//book/@q gt 10