Chapter 14

XQuery APIs

14.1 Introduction

In the last few chapters, you read about XQuery 1.0 and XPath 2.0, languages for querying XML documents, collections, and fragments. But a query language cannot stand alone – it must run in some context. You will read in Chapter 15, “SQL/XML,” that the SQL/XML extensions provide an ideal harness for running XQueries in the context of a SQL database. In this chapter, we focus on a more generic XQuery context, the Java context, and describe the proposed JCP standard XQJ.1 The architecture of XQJ follows that of JDBC® (XQJ has been called “JDBC for XQuery”), which in turn follows ODBC. (See Section 14.2.1 for a description of ODBC and JDBC.)

After describing XQJ, we compare it to SQL/XML as an XQuery API. ...

Get Querying XML 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.