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: xmltype column - how do I get contents?

Re: xmltype column - how do I get contents?

From: F van Nimwegen <fred.van.nimwegen_at_gmail.com>
Date: Mon, 05 Nov 2007 10:54:00 -0000
Message-ID: <1194260040.658719.255190@o80g2000hse.googlegroups.com>


On Nov 2, 2:00 pm, ken quirici <ken.quir..._at_excite.com> wrote:
> On Nov 2, 5:48 am, F van Nimwegen <fred.van.nimwe..._at_gmail.com> wrote:
>
>
>
>
>
> > On Nov 1, 4:29 pm, ken quirici <ken.quir..._at_excite.com> wrote:
>
> > > I'm writing a trigger that compares an :old vs. a :new value for a
> > > column that is
> > > identified as XMLtype. When I look at the 'create' script that Toad
> > > generates
> > > for the table containing this column, there's no storage info - e.g.
> > > that it's stored
> > > as a LOB.
>
> > > Since I'm starting off w/o knowing the contents of the column I can't
> > > supply
> > > a XMLpath string to extractvalue for example. I tried
>
> > > select
> > > ...
> > > extractvalue(<columnname>,'')
> > > ...
>
> > > hoping it would interpret that as meaning 'give me everything', but it
> > > just
> > > returned nulls.
>
> > > I tried the dbms_lob.substr(<columnname>,100,1) but it returned the
> > > error 'wrong number or type of arguments in call to substr'.
>
> > > So how can I get the full contents of the column w/o knowing the
> > > contents
> > > of the column, if you follow my meaning.
>
> > <column_name>.getCLOBVal() converts xmltype to a clob
>
> > readhttp://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb04c...
> > for further information
>
> Actually I had read the 9i version of what you posted. In any event,
> I noticed the getClobval() method example, which I hadn't before,
> being in got-to-get-an-answer-soon-panic mode, and
> the getClobval() method worked just fine. I'm concerned that only
> one row resulted, whereas the example displays a whole XML
> file, but that's probably just the data.
>
> Thanks again. I'll try to relax!- Hide quoted text -
>
> - Show quoted text -

In the examples can also see "1 row selected'". The XML is displayed on more than one line Received on Mon Nov 05 2007 - 04:54:00 CST

Original text of this message

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