text: XQJ Tutorial: Understanding the XQuery API for Java (1 messages)
  The XQuery API for Java (XQJ), is currently under development through the Java Community Process as JSR 225. It provides Java programmers and easy way to use. A new XQJ tutorial covers how to use the XQuery API for java, starting with a simple XQuery/XQJ version of the familiar "Hello World!" application, this XQJ tutorial teaches you the following topics in detail: Introduction to XQJ Using an XQuery/XQJ version of the familiar "Hello World!" application, this tutorial introduces you to some of the similarities between XQJ and JDBC, including connections and datasources, as well as some of the concepts that make XQJ different from JDBC, including data models, typing, and error handling. Configuring XQJ Connections An XQJ application always starts with accessing an XQDataSource object. The XQDataSource object encapsulates all the parameters and settings needed to create a session with a specific implementation, and eventually execute XQuery expressions and process results. This tutorial describes how to work with the XQDataSource object in an XQJ application. Querying Data from XML Files or Java XML API In XQJ, XQExpression objects allow you to execute XQuery expressions. In this tutorial, you'll learn how to use XQExpression objects to query data, and how to use prepared queries to reduce expensive parsing and validation operations. Processing Query Results In XQuery, query evaluation results in a sequence. This tutorial describes how to use the XQJ XQSequence object, which represents an XQuery sequence and a cursor to iterate over the sequence. Serializing XQuery Results This tutorial shows you how to serialize query results as XML, and how to use HTML and XHTML output methods for results. You'll also learn how to serialize results to java.io.Writer and getSequenceAsString() using the writeSequence() method. How to Manipulate Static Context Some information — the default element namespace, default order for empty sequences, the base URI, for example — becomes available before an XQuery expression is evaluated. This information, referred to as the static context, can be accessed through the XQJ API. This tutorial describes the static context in greater detail, and shows how to use XQJ to manipulate it. The XQuery Type System XQuery is a strongly typed language, with a type system based on XML Schema. This tutorial describes how to use the XQSequenceType and XQItemType XQJ interfaces to interact with the XQuery type system. Binding External Variables Continuing from the previous tutorial on Querying Data from XML Files or Java XML APIs, this tutorial discusses the topic of binding variables in greater detail. Need to convert a Java object in your Java application into an XDM instance? XQJ defines this mapping and glues it all together. Creating XDM Instances XQJ offers functionality to create both XQSequence and XQItem objects, not as a result of a query execution, but rather as standalone XDM instances. Read this tutorial and learn more about the flexibility of creating XDM instances outside query execution using XQJ. XML Pipelines An XML pipeline is a sequence of XML processes, also called transformations; in a pipeline, the result of one transformation is passed as input to the next one. In this tutorial, you'll learn how to create a pipeline of XQueries and how to integrate XQuery with JAXP-based XML processors. Processing Large XML Input Files tutorial shows you how to take advantage of streaming processors, like the one available from DataDirect XQuery. XQJ References The XQJ Tutorial introduces a number of technologies and techniques for developing XQuery applications using XQJ. We've compiled a short list of useful resources for those who want to do more self-guided exploration on XQJ and related topics.
  - Posted by: Stylus Studio
  - Posted on: January 18 2008 12:46 EST
  Threaded Messages (1)
  - Re: XQJ Tutorial: Understanding the XQuery API for Java by John Shuster on January 18 2008 15:57 EST
  Re: XQJ Tutorial: Understanding the XQuery API for Java[ Go to top ]
  - Posted by: John Shuster
  - Posted on: January 18 2008 15:57 EST
  - in response to Stylus Studio
  ... with full access to the J2SE and J2EE platforms.Wow, not even out of the JCP and it's already out of date? Last I checked we were up to JavaSE 6 and JEE 5. ;-)