Welcome!

Java Authors: Don MacVittie, Maureen O'Gara, Liz McMillan, Walter H. Pinson, III, Yakov Werde

Related Topics: Java

Java: Article

Data Direct Offers XQJ Tutorial

Provides Intro 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, say Jonathan Robie (recent winner of an InfoWorld Top Innovator Award) and Jonathan Bruce of DataDirect.

"However, many enterprise applications are built on the Java platform, and often require functionality not found in XQuery," they point out. So they have written a detailed tutorial that can now be found at the Bedford, MA-based company's website at www.datadirect.com

"The XQuery API for Java, currently under development as JSR 225, lets programmers have the best of both worlds," the authors say, "using XQuery for XML programming and data integration, with full access to the J2SE and J2EE platforms. XQJ allows a Java program to connect to XML data sources, prepare and issue XQueries, and process the results as XML.

This tutorial shows how XQJ is used to issue XQueries and obtain results. Next, it shows how XQJ can be used to query DOM trees, perform joins between XML and relational sources, obtain results using StAX, and issue prepared XQueries (similar to JDBC's prepared statements). It then moves onto four complete, working XQJ programs, including one that uses StAX to handle output. These programs are based on the Early Draft Review of JSR-225, released in May 2004. Code examples were tested with a pre-release version of DataDirect XQuery, which implements XQuery and XQJ.

More Stories By Java News Desk

JDJ News Desk monitors the world of Java to present IT professionals with updates on technology advances, business trends, new products and standards in the Java and i-technology space.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
JDJ News Desk 08/27/05 03:37:48 PM EDT

The XQuery API for Java, currently under development as JSR 225, lets programmers have the best of both worlds, using XQuery for XML programming and data integration, with full access to the J2SE and J2EE platforms, according to Jonathan Robie and Jonathan Bruce at DataDirect. Now the two have written an extensive tutorial on this subject.