The best way to explain XQuery is to say that the relationship between XQuery and XML is equivalent to the relationship between SQL and database tables.
XQuery is designed to query XML data-not only for XML files, but also for any data that can be presented in XML format, including databases.
What is XQuery?
- XQuery is a language used for XML data query.
- The role of XQuery on XML is similar to that of SQL on databases.
- XQuery is built on an XPATH expression.
- XQuery is supported by all major database engines (IBM, Oracle, Microsoft, etc)
- XQuery is W3C standard.
XQuery-Application Example
XQuery can be used:
- Extract information for use in Network Services
- Generate abstract report
- Convert XML data to XHTML
- Search for network documents for relevant information
XQuery is related to XML queries.
XQuery is a language used to search for and extract elements and attributes from XML documents.
This is an example of an XQuery solution to the actual problem:
"Select all CD records that are stored in the CD set stored in the XML file named cd_catalog.xml at a price less than $10 ."
See:
Http://www.w3school.com.cn/xquery/xquery_intro.asp