The best way to explain XQuery is to say that
XQuery is to XML what SQL is to database table.
XQuery is designed to query XML data - not just
XML files, but anything that can appear as XML, including
database.
What is XQuery?
XQuery is the language for querying XML
data only
XQuery for XML is like SQL for database
XQuery is built on with the use of XPath expressions
XQuery is defined by the W3C standard
XQuery is supported by all the major database engines
( Oracle,IBM, Microsoft, etc.)
XQuery will become W3C standard - and developers can
be sure that the code will work among different products
XQuery is About Querying XML
XQuery is a language for finding and extracting the elements and
attributes from XML documents.
Here is an example of a
question that XQuery could solve only:
"Select all CD records with a price less than $10 from the CD
collection stored in the XML documents called cd_catalog.xml"
XQuery and XPath
XQuery 1.0 and XPath 2.0 share the same data model and
supports the same functions and operators. If you have already
studied XPath you will have no problem with understanding
XQuery.