XQuery Tutorial | what is xquery

what is xquery ?

xquery is a standardized language for combining documents, databases, web pages, and almost anything else.it is very widely implemented.it is powerful and easy to learn.xquery is replacing proprietary middleware languages and web application development languages.

some quick points about the xquery language.

  • xquery is the language for querying xml data
  • xquery is to xml what sql is to databases
  • xquery is an expression language.it is built on xpath expression
  • xquery is supported by all major databases(like ibm, oracle, microsoft).
  • xquery is defined by w3c

capabilities of xquery

xquery has a rich set of features that allow many different types of operations on xml data and documents, including:

  • selecting information based on specific criteria
  • filtering out unwanted information
  • searching for information within a document or set of documents
  • joining data from multiple documents or collections of documents
  • sorting, grouping, and aggregating data
  • performing arithmetic calculations on numbers and dates
  • manipulating strings to reformat text

uses for xquery

  • extracting information from a database for use in a web service
  • generating summary reports on data stored in an xml database
  • searching textual documents on the web for relevant information and compiling the    results
  • selecting and transforming xml data to xhtml to be published on the web
  • splitting up an xml document that represents multiple transactions into multiple xml    documents.

xquery and xpath

xpath is a language for finding information in an xml document.it is used to navigate through elements and attributes in an xml document.

if you want to learn more about xpath language, look our xpath tutorial.

xquery 1.0 and xpath 2.0 share the same data model and support the same functions and operators.for better understading you learn first xpath language.


xquery versions

xquery 1.0 was developed by the xml query working group of the w3c,stable release january 23,2007.

xquery 3.0 is the current candidate recommendation version being developed by the xml query working group of the (w3c)