posted 23 years ago
Has anyone used the Oracle SQL Utility - XSU? What it does is, allow you to add data in a XML file to a database table and be able to extract data from a database table in the form of an XML file. Used both aspects of it without much trouble. As the notes on the utility suggest, I wanted to be able to use XSLT to transform the tags for the data in the XML file before adding it to the database. In other words, I wanted to use XSLT to maintain a mapping of the XML data to the table column names. The idea is to use the same table/column names, but be able to use different XML data to populate it, and vice versa.
For example given the following XML file
<XML version="1.0">
<ROWSET>
<ROW>
<EMPNAME>DAVID</EMPNAME>
<EMPNO>2345</EMPNO>
</ROW>
<ROW>
<EMPNAME>DOE</EMPNAME>
<EMPNO>345</EMPNO>
</ROW>
</ROWSET>
</XML>
I wanted the XML to look like this:
<XML version="1.0">
<ROWSET>
<ROW>
<EMPLOYEE_LNAME>DAVID</EMPLOYEE_LNAME>
<EMPLOYEE_ID>2345</EMPLOYEE_ID>
</ROW>
<ROW>
<EMPLOYEE_LNAME>DOE</EMPLOYEE_LNAME>
<EMPLOYEE_ID>345</EMPLOYEE_ID>
</ROW>
</ROWSET>
</XML>
The XSL for this transformation should be pretty simple. Can anyone give a hand here?
Thanks in advance,
Savithri