XQuery is written in FLWOR fashion which stands for: For, Let, Where, Order by, Return
An example of XQuery is:
for $x in doc("abc.xml")/abc_name
where $x/a>30
order by $x/b
return $x/c
XQuery expression contains two parts: the Prolog and the Body. An XQuery query is made up of a prolog and a body. The XQuery body comprises of a sequence of expressions that specify the intended query result. A series of declarations and definitions that together create the required environment for query processing called the XQuery prolog.