Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Starting with XML Generation

RE: Starting with XML Generation

From: Christian Antognini <Christian.Antognini_at_trivadis.com>
Date: Thu, 24 Aug 2006 16:27:38 +0200
Message-ID: <F2C9CCA71510B442AF71446CAE8AEBAF6154D8@MSXVS04.trivadis.com>


Charlotte

> I'm looking for a "getting started" tip on an XML
> project. I'd like to publish some XML documents from
> a relational schema (this is a reasonably complex
> mapping, not one-table = one-document). I'm new to
> Oracle's XML offering and from my reading so far there
> seems to be a lot of overlapping tools and facilities
> (or possibly just lots of different names for the same
> things?!) I've come across XDB, XDK, SQL built-ins
> like PATH and XML* functions and also various
> DBMS_XML* packages.

It would be necessary to know if you want to accomplish this inside or outside the database. If it is inside the database there are, IMHO, 3 main possibilities (I exclude XDK...).

  1. sys_xmlgen/sys_xmlagg SQL functions: To use this method you should define a structure of object types that is a 1:1 mapping with your XML. Then you can "simply" pass as parameter an instance of the top-level type to the functions and let convert it.
  2. dbms_xmlgen package: Also in this case you have to define an structure of object types. Of course in this case you will have to write some PL/SQL code, i.e. not only SQL like with the previous case.
  3. SQLX functions: In this case no object types. Instead you have to write a fairly complex SQL statement.

Which method you should use? IMHO working with object types it's the much simpler way. Anyway simplicity is not the only requirements... If I where you I would compare the 3 possibilities, in fact CPU and PGA utilization can be very different for each of them. The choice also depends on the Oracle release you are using.

HTH
Chris

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 24 2006 - 09:27:38 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US