XML DB Repository Update Contents

From: Athanasios Mantes <mantesat_at_mail.ntua.gr>
Date: Thu, 13 Nov 2003 16:11:49 +0200
Message-ID: <bp03f4$2t90$1_at_ulysses.noc.ntua.gr>


I am looking for a way to update the contents of a resource in the Oracle XMLDB Repository.

I am trying to write a stored procedure (PL/SQL or Java) that will create a new version on a Resource and fill the created version's contents with data of my choice. So far I have found the following code for updating resource contents

begin

    chackout();
  update resource_view set
res=updateXML(res,'/Resource/Contents/*','Test Data')   where any_path='/public/test1.txt';
    checkin();
end;

But the above code does not work (The contents of the last version remain the same with the previous verion). I have also tried getting an oracle blob through java using

XDB.DBMS_XDB_VERSION.GetContentsBlobByResID(resid_type); and write to it using
Java and BLOB.getBinaryOutputStream();

This also does not work, (the loop that writes to the stream is rolling but the data do not change)

Is there a way I can avoid using FTP or HTTP PUT to update the contents of a resource? Any help would be greatly appreciated. Received on Thu Nov 13 2003 - 15:11:49 CET

Original text of this message