Chapter 10. Practical Examples
Introduction
In the past four years I've answered a lot of questions about XPath and XQuery, and it seems that few of them (questions or answers) were written down anywhere. Well, that's easily fixed.
In this chapter, I've collected some opinionated (but practical) advice about using XQuery. I've also listed solutions to various frequently asked questions about XQuery. It's worth noting that in some cases problems that are very difficult or inefficient to solve in XQuery have easy or more efficient solutions using another programming language or vendor extensions. Use what works.
But first, a few words about XQuery style.
Style
Queries, like most programs, are really written for people to read. Consequently, it's worth ...
Get XQuery: The XML Query Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.