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 -> Re: using xmltype and jdbc insert

Re: using xmltype and jdbc insert

From: Joe Fischer <jfischer_at_insight.rr.com>
Date: Wed, 23 Apr 2003 23:46:03 GMT
Message-ID: <3ea723ae.860236424@news-server.insight.rr.com>

        A good starting point on XMLType tables and columns is Chapter 9 of Oracle 9i XML Database Developer's Guide - Oracle XML DB. This document is available through OTN. There is also a bunch of other stuff in that document that you should familiarize yourself with.

        I'm not sure how useable a single column is; you would have to create an index and do queries using XPath statements. Although storing a document as XML has some advantages, there are some issues that you should consider, such as, white-space preservation in the stored document and how much XPath structures you want to go through. In some cases, it might be easier to store the document as a CLOB as was necessary with 8i.

        Note that if want to use a table of XMLType then you'll need to register an XML schema which adds some more complications.

On 21 Apr 2003 06:24:19 -0700, scottb022563_at_hotmail.com (Scott) wrote:

>I am having trouble inserting a document into a table. What is the
>correct datatype to use for a column specfifed as xmltype? here is a
>simple exmple below. thanks for the help
>
>Scott
>
>CREATE TABLE XML_TEST Oracle 9i
>(
> DOC SYS.XMLTYPE
>)
>
>
>import org.w3c.dom.*;
>
>InputStream is=PropertiesUtils.loadResourceAsStream("HealthAutoInventoryInputTemplate.xml");
> Document doc=XMLUtils.createDocFromStream(is);
> stmt=con.prepareStatement("insert into xml_test
>values(?)");
> stmt.set????(1,doc);
Received on Wed Apr 23 2003 - 18:46:03 CDT

Original text of this message

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