XQuery Engine |
Home:XQuery Engine:XML Tools:Eclipse Tools Support Getting Started with the DataDirect XQuery® Editor for EclipseThe DataDirect XQuery® Editor for Eclipse is an Eclipse plugin that provides support for DataDirect XQuery® in Eclipse, a widely used Java development environment. This plugin requires a valid DataDirect XQuery® installation to work. For information on installing the DataDirect XQuery® Editor for Eclipse, see the procedures documented here. This tutorial covers the following topics:
Uses for the DataDirect XQuery® Editor for EclipseYou can use the DataDirect XQuery® Editor for Eclipse to
The DataDirect XQuery® Editor Perspective in EclipseThe following image shows the DataDirect XQuery® Editor Perspective in the Eclipse environment. Because this tool runs in Eclipse, it is easy to switch from the DataDirect XQuery® Editor Perspective to the Java Perspective, which is very convenient when writing Java programs that use XQuery. The first time you try to execute an XQuery or connect to a relational database, the DataDirect XQuery® Editor prompts you to enter the location of your main DataDirect XQuery® library, ddxq.jar, as shown in the following illustration.
Changing the Location of the DataDirect XQuery® RuntimeIf you want to change the location/version of the DataDirect XQuery® runtime used by the DataDirect XQuery® Editor, you can do that at any time in the Preferences dialog box (shown in the following illustration). To display the Preferences dialog box, select Window > Preferences > DataDirect XQuery Editor. You can also use the Preferences dialog box to
Using Relational Data Sources in Your XQueryThe Database Connections Window (on the right in the following illustration — click to enlarge) lets you configure relational database connections and visualize the structure of relational databases. The XQuery code on the left (note the syntax coloring) was created by simply dragging a relational table (in this case,
Running Ad-Hoc QueriesThe DataDirect XQuery® Editor allows you to run ad-hoc queries and view the results, which can be useful during XQuery code development. Let's take a closer look at the XQuery Results window:
Query results can be displayed in two views — Tree or Text. Tree ViewThe Tree result viewer is a highly scalable way to browse query results; only a few result items are initially downloaded. You can fetch more results by right clicking on the More results available… line, or by clicking the Process more results button in theXQuery Results window.
Text ViewThe Text result viewer serializes the XQuery result as text. If the XQuery results are very large, the Text viewer will display a truncated version of the result serialization.
Once you are satisfied that your query is working as you expect, you can automatically generate a simple Java classes that runs the query using DataDirect XQuery®.
|













