Oracle® XML DB Developer's Guide 10g Release 1 (10.1) Part Number B10790-01 |
|
|
View PDF |
This chapter describes the Oracle XML DB resource application program interface (API) for Java.
This chapter contains these topics:
With Oracle XML DB resource API for Java you use JDBC to access Oracle XML DB resource views for retrieving and modifying database resources.
Additionally, you can perform these operations:
Use the Java API for XMLType
to access and modify parts of XMLType
objects.
Use the save()
method to write changes to the database.
Oracle XML DB resource API for Java includes a set of sub-interfaces that indicate resource type Versioning
information WebDAV.
The API includes interfaces for objects such as workspaces, branches, and baselines (as defined by the WebDAV versioning specification).
Table 22-1 lists the parameters supported by Oracle XML DB resource API for Java.
Table 22-1 Oracle XML DB Resource API for Java: Parameters
Parameter Name | Description |
---|---|
PROVIDER_URL |
The start path from which objects are to be returned. |
INITIAL_CONTEXT_FACTORY |
The context factory to be used to generating contexts – always DBMS_XDB.spi.XDBContextFactory . |
XDB_RESOURCE_TYPE |
Determines what data is returned to the application by default when a path name is resolved:
In this release, Oracle XML DB has implemented only the |
Example 22-1 Resource JDBC: Using SQL To Determine Purchase Order Properties
This examples uses a SQL SELECT
and criteria other than path name to retrieve the XMLType
object:
PreparedStatement pst = con.prepareStatement( "SELECT r.RESOLVE_PATH('/companies/oracle') FROM XDB$RESOURCE r"); pst.executeQuery(); XMLType po = (XMLType)pst.getObject(1); Document podoc = (Document) po.getDOM();