Introduction to XQuery |
|
XQuery is a query language for querying XML documents. XQuery is typically used to query XML documents that represent office documents, such as bills or invoices. Similar to XSLT, XQuery manipulates XML data and uses XPath expressions to locate parts of an XML document. The following code snippet is an XQuery expression that uses the doc() function to open example.xml and the /name XPath expression to select the name element in the XML document: doc("example.xml")/name While XPath is used for simple data extraction, XQuery supplements XPath with FLWOR expressions that enable you to create custom expressions to query XML data. |
![]() |
Click the Next button to continue. |