XQuery Tutorials

Welcome to DataDirect XQuery® Tutorials! We've created this page so you can learn valuable XQuery skills and pick up important XQuery tips. But don't forget to come back and re-visit this site, because we're always adding new tutorials to help you out.

Converting from HL7 2.x to HL7 3.x with DataDirect XML Converters

HL7 versions 2.x and 3.x use different information models. HL7 2.x is EDI-based, 3.x is XML-based, and the concepts are different. This example shows how to go from one to the other, using DataDirect XQuery and DataDirect XML Converters for HL7.

Learn More

DataDirect XQuery and XQJ in your Java application

DataDirect XQuery and XQJ in your Java application to perform tasks that allow you to process queries that access XML and relational data sources, and return XML results, including Configuring connections to relational data sources, Executing queries, querying data in XML sources and DOM trees, joining data from XML and relational data sources, returning results as DOM trees, SAX event streams, and StAX event streams, and using prepared queries (similar to JDBC prepared statements).

Learn More

How to Split XML Files

A common challenge in XML development is splitting a large XML document in several smaller ones. Learn how to deal with such huge XML documents by leveraging DataDirect XQuery to read and split XML.

Learn More

Performance Tips for DataDirect XQuery

DataDirect XQuery® was designed for performance and scalability, which are critical to our customers. This document describes some of the performance optimizations in our XQuery implementation and provides guidelines that will make most applications perform well.

Learn More

Using XQuery

W3C XQuery is a query language for XML. The most common use cases for XQuery involve XML publishing to create XML for Web messages, dynamic web sites, or publishing applications. The original data may be found in XML files, or it may be in a data store such as a relational database.

Learn More

XQuery Functions

XQuery functions, like any programming language functions are useful as a mechanism for hiding complexity, encouraging code re-use, and for advanced computation. This tutorial shows you how to write your own user-defined functions in XQuery.

Learn More

XQUERY A GUIDED TOUR

XML (Extensible Markup Language) is an extremely versatile data format that has been used to represent many different kinds of data, including web pages, web messages, books, business and accounting data, XML representations of relational database tables, programming interfaces, objects, financial transactions, chess games, vector graphics, multimedia presentations, credit applications, system logs, and textual variants in ancient Greek manuscripts.

Learn More

An XQJ Tutorial: Introduction to the XQuery API for Java

The XQuery language is designed specifically for XML programming and data integration, and programmers are more productive using XQuery for these tasks. However, many enterprise applications are built on the Java platform, and often require functionality not found in XQuery; for instance, many XML programs need to use the Web Services functionality of J2EE.

Learn More

Using XQuery to Produce HTML and Images

Need to produce HTML and image output from XQuery? The following tutorial explains how to create an HTML document referencing JPEG files through XQuery. The DataDirect XQuery built-in function ddtek:serialize-to-url is used to save the JPEG images.

Learn More

Use XQuery from a Java environment

IBM's Developerworks claims "the easiest way to begin with XQJ is to download a free trial from DataDirect." This article is an introduction to XQuery and XQJ, and clarifies its examples throughout by using DataDirect XQuery.

Learn More

Querying XML Columns with DataDirect XQuery

Increasingly, XML is stored in relational databases as structured XML. Some applications will continue to shred XML into a relational format or store XML as CLOB values. Other applications can now take advantage of relational databases that support a native XML data type to represent an XML document or XML document fragment. This paper shows how you can use DataDirect XQuery® to query XML stored as character data and query XML stored as XML.

Learn More

Multiple XML Output Files Using XQuery

Imagine a directory with XML files, each needing to be transformed to a new XML document. This tutorial covers how to query the complete directory and generate the results, all from a single XQuery, with no need for multiple queries, external scripting, or Java code.

Learn More

Learn XQuery in 10 Minutes

This XQuery tutorial written by Dr. Michael Kay is for all those people who really want to know what XQuery is, but don't have the time to find out. It covers what XQuery is, and even how to write and run an example XQuery application, all in just 10 minutes!

Learn More

How to Load XML into a Database

Need to get XML into a Database? Learn how DataDirect XQuery provides an easy and scalable solution for saving or loading XML into any database.

Learn More

Building XML Workflow Applications

XML workflow is all about application design. Rather than starting with a database for storing the data, think in terms of the data as it moves around the system; it's a process-oriented rather than data-centric approach. This tutorial explains how to model and develop an XML-workflow application.

Learn More

An Introduction to the XQuery FLWOR Expression

FLWOR is acronym made up from the five clauses that make up an XQuery FLWOR expression: for, let, where, order by, and return. This tutorial shows how to write an example XQuery FLWOR expression to join data and format results.

Learn More