Using an Oracle View to store query results as an XML output

Sonswish - Oracle database browser
More about Sonswish
Download Sonswish Trial
Order Sonswish

XML Converter is now available!

Summary

This article describes how to convert a generated Oracle database query results to an allocated XML file by using RustemSoft XML Converter. Exactly, you can create an XML output file from Oracle SQL queries by using some Oracle utilities (XSU, XSQL). These utilities functionalities are accessible through a Java API, a PL/SQL API, or a java command line front end.
However, the present-day IT evolution demands a tool, which allows users to perform manual adjustments to update Oracle view SQL script, browse and control the query result, update the query and store it, administer transformation to XML and modify mapping and writing parameters.


XML Converter provides a completely graphical user-friendly environment which will help you visually transform Oracle tables or/and views to XML format. You will be able browse view the result in data grid and convert to XML document. Using XML Converter you can query an Oracle tables and return results as XML outputs. In XML Converter user interface you can create and replace a view, this view will contain the results of the query.

Connecting to a Database

You can connect directly to a Database to obtain some XML outputs. The "Connect to Database" dialog box is used to connect to an Oracle database server or to MS SQL Server. You can display the Connect to Database dialog box by selecting the "Connect to Database" item from the "File" menu or just push "Ctrl+F2" keys. You can also access the dialog box by selecting the "Connect to Database" button in the Main dialog toolbar and left-mouse clicking to call the dialog.
User Name: Specifies user's name for connecting to the database.
Password: Specifies user's password for connecting to the database.
Database: Network service name, such as MY_DATABASE, for the database to which you are connecting. The connect strings for the service names must be set up correctly. Otherwise, the connection provider used by the XML Converter is not able to locate the database.

Check the "Save connection Info" option to store the connection settings as the preferred settings to be used when connecting to this database next time when you will use XML Converter again. You can set up "Save connection Info" to connect to a database without entering login information.

You can open and browse some Oracle database objects. The types of database objects that XML Converter supports for an Oracle database are:

Properties
Tables
Synonyms
Views
Stored Procedures
Functions
Packages
Triggers


Oracle Table Data editing
XML Converter for Oracle now has Table Data Editing features, which allows you to view, update, and delete the contents of a table. To view table data, simply left-mouse click a table in the tree view and just start to edit table data content.
In the Table Data Editing mode, you can perform the following tasks:
View a table you have selected as rows and columns in a datagrid.
Update fields, and insert and delete rows in the table.
Make multiple changes, which will be applied to Oracle database at once.
User can edit and format memo field values (LONG data type) in a special text editing window.



Store Oracle query results as an XML output

By clicking right mouse button on the database tree (left pane) XML Converter allows you to create new view.

Then you will need to insert a SQL script for your query. In middle pane "Script" tab you may write something like the following:

SELECT * FROM MY_TABLE

and then save your new view.

Then you could select "Data" tab button and browse data grid to move through the query result. You can now query created view as if it were a single database table.

Also you may overwrite the previous view. Go back to "Script" section of middle pane and rewrite your query, change something in query script. For example, you may change your query SQL script:

SELECT * FROM MY_TABLE ORDER BY YEAR

Click "Save" button and go back to "Data". Your view will be replaced and corresponding query result will be recreated.

To start data transformation just click "XML" button on main XML Converter toolbar.
After reviewing or editing your destination XML output in a special window (right pane) you can save the XML file by using "Save" dialog box.



Resume

It is very likely that your first question would be: why should I use that XML Converter if I already can create an XML output from Oracle SQL queries by using some Oracle utilities (XSU, XSQL) in my java code? Indeed, every professional programmer has his own ways and methods to convert Oracle data to XML format. Youre quite right! Dont spend your money until you finally decide that you really want to:

Eventually understand, what the heck XML Converter does with your data;

What XML Converter takes as its source and what it produces;

See on your screen something more human friendly than just freaking mysterious process done...;

Set very powerful transformation control software, flexible and elastic, yet with a really simple and friendly user interface


Main Features of XML Converter related to Oracle database are:

Supports Generation of XML documents from Oracle tables and/or views.

Supports in XML Converter GUI inserts, updates, and deletes of database records. Update data directly to Oracle database. These updates are corresponding to a given XML document.

Supports general Oracle data types.

Create and update Oracle views. By using XML Converter you can create a view in your Oracle database, browse query result, update the view and store it.

Supports dynamic generation of Document Type Definition (DTD) or XML Schema Definition (XSD) while retrieving an XML document from the database.

Supports simple transformation of the retrieved XML document using XML Stylesheets (XSL).





Copyright © 2001-2008 RustemSoft