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

Home -> Community -> Usenet -> c.d.o.server -> OracleXMLSave problem + abstract datatypes

OracleXMLSave problem + abstract datatypes

From: <christopher.collins_at_gxs.ge.com>
Date: Thu, 30 Nov 2000 16:22:18 GMT
Message-ID: <905urf$83r$1@nnrp1.deja.com>

I have been trying to define abstract datatypes in Oracle so that I can map XML directly to the internal structure of my database. From what I have seen, this can be done with some help from the XML SQL packages.

Here is the situation:
I have three new datatypes. XItem, XHeader, and XBody.

create type XHeader as object (

    name VARCHAR2(256),
    id NUMBER );

create type XBody as object (

    description VARCHAR2(256),
    part NUMBER );

create type XItem as object (

    header XHeader,
    body XBody );

create table ItemList (

    item Xitem );

I am able to insert data into ItemList table, and use an OracleXMLQuery object to retrieve this data as an XML document. When I try to insert the XML fragment below (as well as every variation on it I can think of), I get an error.

<item>
  <header>
<name>Chris</name>
<id>1</id>

  </header>
  <body>
<description>perturbed</description>
<part>2</part>

  </body>
</item>

The error that I receive is this:

Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: No rows to modify -- the row enclosing tag missing. Specify the correct row enclosing tag.

This is basically what the code looks like:

OracleXMLSave sav = new OracleXMLSave(conn, "ItemList"); ...
sav.insertXML(xmlFragment);
sav.close();

If anyone is familiar with this error, you help would be very much appreciated! Thanks!

Chris

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 30 2000 - 10:22:18 CST

Original text of this message

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