XQuery transformation

Data is stored in relational databases but often it is required that data is extracted and transformed as XML when interfacing to other components and services Also, it is an XPath-based querying language supported by most NXD vendors. XQuery is designed to retrieve and interpret XML data from any source, whether it is a database or a document.

To perform a query database you will first need to configure a data source and a connection (details can be found in the Relational Database Support and Native XML Database Support sections).

Next, configure a transformation scenario and associate it with your XQuery document:

  1. Open the Configure Transformation Scenario dialog.

  2. Click the New button.

  3. In the Edit Scenario dialog insert the scenario's name. Then, from the list of available Transformers choose the database connection you need. Configure any other parameters if necessary.

  4. Click OK to finish editing the scenario.

To query the database, apply the transformation scenario associated with your XQuery document. To view a more complex value returned by the query that cannot be displayed entirely in the XQuery query result table at the bottom of the Eclipse window, for example an XMLTYPE value or a CLOB value, you have to right click on that cell, select the action Copy cell from the popup menu for copying the value in the clipboard and paste the value where you need it, for example an opened XQuery editor panel of Eclipse .