This chapter explains how to get started with Oracle XML Developer's Kit (XDK) for C++. The C++ demo programs are on the Oracle Database Examples media.
The XDK for C++ components are included with Oracle Database.
See "Installing XDK" for installation instructions.
See Also:
"Overview of XDK" for a list of the XDK for C++ componentsThe C++ libraries described in this section are located in $ORACLE_HOME/lib
. The XDK for C and C++ components are contained in the library:
libxml11.a
In addition to the XDK for C components described in "XDK for C Component Dependencies on UNIX," the library includes the XML class generator, which creates C++ source files based on an input document type definition (DTD) or XML Schema.
Table 18-1 in "XDK for C Component Dependencies on UNIX" describes the Oracle CORE and Globalization Support libraries on which the XDK for C components (UNIX) depend. The library dependencies are the same for C and C++.
Table 18-2 in "Setting XDK for C Environment Variables on UNIX" describes the UNIX environment variables required for use with the C XDK components. The environment variables are the same for C and C++.
You can test your environment by running any of the utilities described in Table 18-3 in "Testing the XDK for C Runtime Environment on UNIX." These utilities are C utilities that do not have C++ versions.
Both the C and C++ header files are located in $ORACLE_HOME/xdk/include
. Table 25-1 describes the C++ header files. Table 18-4 in "Setting Up and Testing the XDK C Compile-Time Environment on UNIX" describes the C header files. Your runtime environment must be set up before you can compile your C++ code.
Table 25-1 Header Files in the XDK for C++ Compile-Time Environment
Header File | Description |
---|---|
|
Includes the Oracle9i XML ORA data types and the public ORA application programming interfaces (APIs) included in |
|
Includes the C APIs for the C++ class generator (only for backward compatibility). |
|
Includes the Oracle9i XML schema definition (XSD) validator data types and APIs (only for backward compatibility) |
|
Handles the Unified Document Object Model (DOM) APIs transparently, whether you use them through Oracle Call Interface (OCI) or standalone |
|
Includes the common APIs, whether you compile standalone or use OCI and the Unified DOM |
|
Includes the initialization and exception-handling public APIs |
The simplest way to test your compile-time environment is to run the make
utility on the sample programs. The demo programs are located on the Examples media rather than the Oracle Database CD. After installing these programs, they are located in $ORACLE_HOME/xdk/demo/cpp
.
Build and run the sample programs by executing these commands at the system prompt:
cd $ORACLE_HOME/xdk/demo/cpp make
The C++ libraries described in this section are located in %ORACLE_HOME%\lib
. The XDK for C and C++ components are contained in this Windows library:
libxml10.dll
Table 18-5 in "XDK for C Component Dependencies on Windows" describes the Oracle Common Oracle Runtime Environment (CORE) and Globalization Support libraries on which the C components for Windows depend. The library dependencies are the same for C and C++.
Table 18-6 in "Setting XDK for C Environment Variables on Windows" describes the Windows environment variables required for use with the XDK for C components. The environment variables are the same for C and C++.
You can test your environment by running any of the utilities described in Table 18-7 in "Testing the XDK for C Runtime Environment on Windows." These utilities are C utilities that do not have C++ versions.
Table 25-1 in the section "Setting Up and Testing the XDK for C++ Compile-Time Environment on UNIX" describes the header files required for compilation of the C components on Windows. The relative file names are the same on both UNIX and Windows installations.
On Windows the header files are located in %ORACLE_HOME%\xdk\include
. Your runtime environment must be set up before you can compile your code.
You can test your compile-time environment by compiling the demo programs, which are located in %ORACLE_HOME%\xdk\demo\cpp
if you have installed the Oracle Database Examples media.
The procedure for setting the C++ compiler path is identical to the procedure described in "Setting the XDK for C Compiler Path on Windows." The procedure for editing the Make.bat
files is identical to the procedure described in "Editing the Make.bat Files on Windows."
You can set up a project in Microsoft Visual C/C++ and use it for the demos included in XDK. See "Using the XDK for C Components and Visual C++ in Microsoft Visual Studio" for instructions.