Deleting Resources

To delete the created files or folders, run the following commands (delete_resources.sql):

Listing 3-3 Deleting Folders and Files in XML DB Repository Using SQL

delete from RESOURCE_VIEW

where equals_path(res,‘/public/chp03/john_smith.xml’)=1;

ROLLBACK;

exec dbms_xdb.deleteresource(‘/public/chp03/john_smith.xml’);

ROLLBACK;

Note that to continue our examples in the following sections, we roll back the file and folder deletions with the ROLLBACK command.

Get Oracle Database 11g Building Oracle XML DB Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.