Zorba Live Demo
> Get started with XQuery (using Zorba 0.9.5)
Your XQuery
Example Queries:
Try-Catch
:
Catch a Type Error
Multiple Catch Clauses
Description Variable
Nested Try-Catch
Catching Error
Catching Everything
GroupBy
:
Simple 1
Simple 2
Group By two Vars
Three-Level Hierarchy
Ordering among/within Groups
Eval
:
Invalid Example (Using Clause)
Global Var Access
Global Var and Function Access
Namespaces
Invalid (wrong use in FLWOR)
Atomization
Invalid (Using with equal QNames)
Invalid (Expecting single Item)
Var Access
Var Access over User def Function
node-reference
:
Node Reference
Node By Reference
REST
:
retrieve Google website
invoke Google search
use referer header
post with multipart string params
post with xml part
get with tidy and options
Window-Clause
:
non-overlapping windows
averages of non-overlapping windows
first and last items in each window
end clause without the only keyword
start without explicit end
non-overlapping sequences starting with modulo
Sliding Window Example
moving averages
end clause without the only keyword (sliding)
GFLWOR
:
All FLWOR clauses can appear in any order
Multiple where clauses
Simple Example
Calculate Order Price
Return Most Valueable Order
Output Numbering
Tidy
:
tidy function
tidy function with options
JSON
:
XQuery
(required):
XML Documents
Example Documents:
books.xml
products.xml
sales-records.xml
stores.xml
mydoc.xml
(optional):