What is XQuery?
1. Xquery is a query language that is used to retrieve data from XML documents.
2. XQuery is a way to query the XML data, It is built on XPath expressions and is supported by quite a few database engines.
3. It can find and extract elements and attributes from XML documents.
4. 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
What is XPATH?
1. XPath is a language that describes how to locate specific elements (and attributes, processing instructions, etc.) in a document.
2. An XSL sublanguage designed to uniquely identify or address parts of a source XML document, for use with XSLT.
3. It is based on a tree representation of XML document. It provides the ability to navigate around the tree and to select the nodes by a variety of criteria.
4. The simplest XPath is /A/B/C where C is the child of B, B child of A