Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When loading documents via FTP, HTTP, or WebDav to XML DB Repository, we are creating XML DB Repository resources. In addition to this approach, creating XML DB Repository resources in SQL.
In Oracle XML DB, the following PL/SQL functions/procedures can be used to create/delete XML DB Repository resources:
DBmS_xDB.createResource() This function creates a new XML DB file.
DBmS_xDB.createFolder() This function creates a new folder.
DBmS_xDB.existsResource() This function checks whether a file exists in XML DB Repository. Normally, you need to check if a file exists before creating a new one.
DBmS_xDB.deleteResource() This procedure deletes an existing XML DB Repository resource.
The following example creates a folder and a file in XML DB Repository (create_resources.sql):