AN INTRODUCTION TO XQUERY query orders the returned items by the text of the lastNamesubelement of the name. for $p in doc( mydocument.xml )/people/person[age > 50] order by $p/name/lastName/text() descending return $p/name/firstName/text() The return keyword defines what the sequence that constitutes the return value will look like. In the last few queries, we have only been returning information derived from tuples as simple items. But items can be composed from scratch or using existing tuple information using node constructors. Node constructors can use simple literal strings with individual items separated by commas, but they can also use calculated values enclosed in curly braces. An example follows.
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP Web Hosting services