XQuery¶
Use XQuery when you need more advanced XML querying or update behavior than a single XPath expression can provide.
XQuery builds on XPath. It is the better choice when you need to iterate over XML collections, reshape result sets, or apply update logic that would be awkward in a short XPath expression.
When to Use XQuery¶
- querying XML databases with more than a simple path filter
- returning transformed XML structures
- iterating through collections with
forandlet - applying update-oriented logic through the XQuery update facility
Section Map¶
- Basic Features for the core language and query structure
- Advanced Features for update behavior, ordering, and conflict scenarios
Prerequisite¶
Learn XPath first. Most XQuery statements embed XPath expressions directly.