Random xmldb post



Been a busy few weeks so had no time to post anything. This SQL below is useful if you want to retreive an earlier version of a version document in xmldb - there is probably only one other person in Europe using this functionality - but you never know....

DECLARE
  retb DBMS_XDB_VERSION.resid_list_type;
  v_xml clob;
BEGIN
  retb := DBMS_XDB_VERSION.GETPREDECESSORS('/public/testing/versions/demo.xml') ;
  for i in retb.first .. retb.last LOOP
  v_xml := dbms_xdb_version.getcontentsclobbyresid(retb(i));
  dbms_output.put_line(v_xml);
  end loop;
END;
/

This shows the earlier versions of the document /public/testing/versions/demo.xml.

serveroutput needs to be on of course........

Comments