Skip Headers
Oracle® XML Developer's Kit Programmer's Guide
10g Release 2 (10.1.2)
Part No. B14033-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Index
Index

Next
Next
 

Contents

List of Figures

List of Tables

Title and Copyright Information

Send Us Your Comments

Preface

Audience
Documentation Accessibility
Structure
Related Documents
Conventions

What's New in Oracle XML Developer's Kit?

Oracle Database 10g Release 1 (10.1) New Features in Oracle XML Developer's Kit

1 Overview of XML Developer's Kit Components

Introducing Oracle XML Developer's Kit
Overview of Oracle XDK Components
XDK Functionality Applied to XML Documents
XML Parsers
XSL Transformation (XSLT) Processors
JAXB and C++ Class Generators
XML Schema Processor
XDK JavaBeans
DOMBuilder
XSLTransformer
DBAccess
XMLDiff
XMLCompress
XMLDBAccess
XSDValidator
Oracle XML SQL Utility (XSU) for Java
XSQL Pages Publishing Framework
TransX Utility
Soap Services
Using XDK-supported Languages to Generate XML Documents
Using XSU for Java to Generate XML Documents
Generating XML from Query Results
XML Document Structure: Columns Are Mapped to Elements
XSU Generates the XML Document as a String or DOM Element Tree
XSU Generates a DTD Based on Queried Table's Schema
Using Oracle XDK Java Components to Generate XML Documents
Using Oracle XDK C Components to Generate XML Documents
Using Oracle XDK C++ Components to Generate XML Documents
XDK and Application Development Tools
Browsers That Support XML
Oracle XML Gateway
Oracle Data Provider for .NET
JDeveloper
User Interface XML (UIX)
Recommended Books and Web Sites About XML
Using Oracle XML-Enabled Technology
Information for Using the XDK
Using Apache Web Server Instead of the Oracle9i Application Server
Need for an XML Parser If all the XML Was Created By Programs
SQL*Loader and Nesting in XML Documents
Information About Previous Oracle Releases
Using Oracle Database Version 7 and XML
Doing Data Transfers to Other Vendors Using XML from Oracle Release 7.3.4
Using Versions Prior to Oracle8i and Oracle XML Tools?
XML Standards That Oracle Supports
B2B Standards and Development Tools that Oracle Supports
Oracle Corporation's Direction Regarding XML
Oracle Corporation's Plans for XML Query
Maximum XML File Sizes
Limitations on the Size of an XML File
Size Limit for XML Documents Generated from the Database
Maximum Size for an XML Document for PL/SQL

2 Getting Started with XDK Java Components

XDK Java Components Specifications
DOM Specifications
XSL Transformations Specifications
Installing XDK Java Components
XDK Java Components Directory Structure
XDK Java Components Environment Settings
UNIX Environment Settings for XDK Java Components
Windows Environment Settings for XDK Java Components
XDK Java Components Globalization Support
XDK Java Components Dependencies
Verifying the XDK Java Components Version

3 XML Parser for Java

XML Parser for Java Overview
Namespace Support
XML Parser for Java Validation Modes
Using DTDs with the XML Parser for Java
Enabling DTD Caching
Recognizing External DTDs
Loading External DTDs from a JAR File
Checking the Correctness of Constructed XML Documents
Parsing a DTD Object Separately from an XML Document
XML Parsers Case-Sensitivity
Allowed File Extensions in External Entities
Creating a DOCUMENT_TYPE_NODE
Standard DTDs That Can be Used for Orders, Shipments, and So On
About DOM and SAX APIs
DOM: Tree-Based API
SAX: Event-Based API
Guidelines for Using DOM and SAX APIs
DOM
SAX
About XML Compressor
XML Serialization and Compression
Running the Sample Applications for XML Parser for Java
Using XML Parser for Java: DOMParser Class
Without DTD Input
With a DTD Input
Comments on Example 1: DOMSample.java
XML Parser for Java Example 1: DOMSample.java
Using XML Parser for Java: DOMNamespace Class
XML Parser for Java Example 2: Parsing a URL — DOMNamespace.java
Using XML Parser for Java: SAXParser Class
XML Parser for Java Example 3: Using the Parser and SAX API (SAXSample.java)
XML Parser for Java Example 4: (SAXNamespace.java)
Using the XML Parser for Java
Using DOM and SAX APIs for Java
Using the DOM API to Count Tagged Elements
Creating a Node with a Value to Be Set Later
Traversing the XML Tree Using XPATH
Finding the First Child Node Element Value
Using the XMLNode.selectNodes() Method
Generating an XML Document from Data in Variables
Using the DOM API to Print Data in the Element Tags
Building XML Files from Hash Table Value Pairs
DOM Exception WRONG_DOCUMENT_ERR on Node.appendChild()
Getting DOMException when Setting Node Value
Extracting Embedded XML from a CDATA Section
Using Character Sets with the XML Parser for Java
Reading a Unicode XML File
Writing an XML File in UTF-8
Writing Parsing XML Stored in NCLOB with UTF-8 Encoding
Parsing a Document Containing Accented Characters
Storing Accented Characters in an XML Document
You Cannot Dynamically Set the Encoding for an Input XML File
Using System.out.println() and Special Characters
General Questions About XML Parser for Java
Including Binary Data in an XML Document
Displaying an XML Document
Including an External XML File in Another XML File
You Do Not Need Oracle9i or Higher to Run XML Parser for Java
Inserting Characters <, >, ', ", and & into XML Documents
Invalid Special Characters in Tags
Parsing XML from Data of Type String
Extracting Data from an XML Document into a String
Illegal Characters in XML Documents
Using Entity References with the XML Parser for Java
Merging XML Documents
The XML Parser for Java Does Not Need a Utility to View the Parsed Output
Support for Hierarchical Mapping
Support for Ambiguous Content Mode
Generating an XML Document Based on Two Tables
Using JAXP
oraxml: XML Parser for Java Command-line

4 XSLT Processor for Java

XSLT Processor for Java Overview
Using XSLT Processor for Java
XSLT Processor for Java Example
XSLT Command-Line Interface: oraxsl
XML Extension Functions for XSLT Processing
XSLT Processor for Java Extension Functions and Namespaces
Static Versus Non-Static Methods
XML Parser for Java - XSL Example 1: Static function
Constructor Extension Function
XML Parser for Java - XSL Example 2: Constructor Extension Function
Return Value Extension Function
XML Parser for Java XSL- XSL Example 3: Return Value Extension Function
Datatypes Extension Function
XML Parser for Java - XSL Example 4: Datatype Extension Function
XSLT Processor for Java Built-In Extensions: ora:node-set and ora:output
ora:output
ora:node-set
Example of Use of Oracle XSL Extensions
Hints for Using the XSLT Processor for Java and XSL
Merging Two XML Documents
Example: Using importNode() from DOM Level 2
Example: Using adoptNode from DOM Level 3
Example: demo1.xml
Example: demo2.xml
Example: demomerge.xsl
Extracting Embedded XML Using Only XSLT
Support of Output Method "html" in the XSL Parser
Creating an HTML Input Form
Correct XSL Namespace URI
XSL Processor Produces Multiple Outputs
Keeping White Spaces in Your Output
XDK Utilities That Translate Data from Other Formats to XML
Multiple Threads Using a Single XSLProcessor and Stylesheet
Using Document Clones in Multiple Threads
Disabling Output Escaping Is Supported

5 XML Schema Processor for Java

What Is XML Schema?
What Are DTDs?
DTD Limitations
Comparison of XML Schema Features to DTD Features
XML Schema Processor for Java Features
Supported Character Sets
Requirements to Run XML Schema Processor for Java
XML Schema Processor for Java Usage
Using the XML Schema API
XML Schema Processor for Java Sample Programs

6 Using JAXB Class Generator

What Is JAXB?
Replacing the XML Class Generator with JAXB Class Generator
Unmarshalling, Marshalling, and Validating Using JAXB
Using JAXB Class Generator
Features Not Supported in JAXB
JAXB Class Generator Command-Line Interface
JAXB Compared with JAXP

7 XML SQL Utility (XSU)

What Is XML SQL Utility (XSU)?
Generating XML from the Database
Storing XML in the Database
Accessing XSU Functionality
XSU Features
XSU Dependencies and Installation
Dependencies of XSU
Installing XSU
Where XSU can be Installed
XML SQL Utility in the Database
XML SQL Utility in the Middle Tier
XML SQL Utility in a Web Server
SQL-to-XML and XML-to-SQL Mapping Primer
Default SQL-to-XML Mapping
SQL-to-XML Mapping Against Object-Relational Schema
Customizing the Generated XML: Mapping SQL to XML
Source Customizations
Mapping Customizations
Post-Generation Customizations
Default XML-to-SQL Mapping
How XML SQL Utility Works
Selecting with XSU
Queries That XSU Cannot Handle
Inserting with XSU
Updating with XSU
Deleting with XSU
Using the XSU Command-Line Front End OracleXML
Generating XML Using the XSU Command Line
XSU's OracleXML getXML Options
Inserting XML Using XSU's Command Line (putXML)
XSU OracleXML putXML Options
XSU Java API
Generating XML with XSU's OracleXMLQuery
Generating XML from SQL Queries Using XSU
XSU Generating XML Example 1: Generating a String from Table employees (Java)
How to Run This Program
XSU Generating XML Example 2: Generating DOM from Table employees (Java)
Paginating Results: skipRows and maxRows
Keeping the Object Open for the Duration of the User's Session
When the Number of Rows or Columns in a Row Is Too Large
keepObjectOpen Function
XSU Generating XML Example 3: Paginating Results: (Java)
Generating XML from ResultSet Objects
XSU Generating XML Example 4: Generating XML from JDBC ResultSets (Java)
XSU Generating XML Example 5: Generating XML from Procedure Return Values
Raising NoRowsException
XSU Generating XML Example 6: No Rows Exception (Java)
Storing XML Back in the Database Using XSU OracleXMLSave
Insert Processing Using XSU (Java API)
XSU Inserting XML Example 7: Inserting XML Values into All Columns (Java)
XSU Inserting XML Example 8: Inserting XML Values into Columns (Java)
Update Processing Using XSU (Java API)
XSU Updating XML Example 9: Updating a Table Using the keyColumns (Java)
XSU Updating XML Example 10: Updating a Specified List of Columns (Java)
Delete Processing Using XSU (Java API)
XSU Deleting XML Example 11: Deleting Operations Per Row (Java)
XSU Deleting XML Example 12: Deleting Specified Key Values (Java)
Advanced XSU Usage Techniques
XSU Exception Handling in Java
OracleXMLSQLException Class
OracleXMLNoRowsException Class
Hints for Using XML SQL Utility (XSU)
Schema Structure to use with XSU to Store XML
Storing XML Data Across Tables
Using XSU to Load Data Stored in Attributes
XSU is Case-Sensitive
XSU Cannot Generate the Database Schema from a DTD
Thin Driver Connect String Example for XSU
XSU and COMMIT After INSERT, DELETE, or UPDATE
Mapping Table Columns to XML Attributes Using XSU

8 XSQL Pages Publishing Framework

XSQL Pages Publishing Framework Overview
What Can I Do with Oracle XSQL Pages?
Where Can I Obtain Oracle XSQL Pages?
What Is Needed to Run XSQL Pages?
Security Considerations for XSQL Pages
Install Your XSQLConfig.xml File in a Safe Directory
Disable Default Client Stylesheet Overrides
Be Alert for the Use of Substitution Parameters
What's New in XSQL Pages Release 10.1
Overview of Basic XSQL Pages Features
Producing XML Datagrams from SQL Queries
Transforming XML Datagrams into an Alternative XML Format
Transforming XML Datagrams into HTML for Display
Setting Up and Using XSQL Pages in Your Environment
Using XSQL Pages with Oracle JDeveloper
Setting the CLASSPATH Correctly in Your Production Environment
Setting Up the Connection Definitions
Using the XSQL Command-Line Utility
Overview of All XSQL Pages Capabilities
Using All of the Core Built-in Actions
The <xsql:query> Action
The <xsql:dml> Action
The <xsql:ref-cursor-function> Action
The <xsql:include-owa> Action
Using Bind Variables
Using Lexical Substitution Parameters
Providing Default Values for Bind Variables and Parameters
Understanding the Different Kinds of Parameters
The <xsql:include-request-params> Action
The <xsql:include-param> Action
The <xsql:include-xml> Action
The <xsql:include-posted-xml> Action
The <xsql:set-page-param> Action
The <xsql:set-session-param> Action
The <xsql:set-cookie> Action
The <xsql:set-stylesheet-param> Action
Working with Array-Valued Parameters
Setting Array-Valued Page or Session Parameters from Strings
Binding Array-Valued Parameters in SQL and PL/SQL Statements
Supplying Multi-Valued Parameters on the Command Line
Supplying Multi-Valued Parameters Programmatically with XSQLRequest
Conditionally Executing Actions or Including Content with <xsql:if-param>
Optionally Setting an Error Parameter on Any Built-in Action
Aggregating Information Using <xsql:include-xsql>
Including XMLType Query Results
Handling Posted Information
Understanding Different XML Posting Options
Using Custom XSQL Action Handlers
Description of XSQL Servlet Examples
Setting Up the Demo Data
Advanced XSQL Pages Topics
Using a Custom XSQL Configuration File Name
Understanding Client Stylesheet-Override Options
Controlling How Stylesheets Are Processed
Controlling the Content Type of the Returned Document
Assigning the Stylesheet Dynamically
Processing Stylesheets in the Client
Providing Multiple, UserAgent-Specific Stylesheets
Using XSQL Configuration File to Tune Your Environment
Using the FOP Serializer to Produce PDF Output
Using XSQL Page Processor Programmatically
Writing Custom XSQL Action Handlers
Writing your Own Action Handler
Using Multi-Valued Parameters in Custom XSQL Actions
Writing Custom XSQL Serializers
Using a Custom XSQL Connection Manager for JDBC Datasources
Writing Custom XSQL Connection Managers
Providing a Custom XSQLErrorHandler Implementation
Providing a Custom XSQL Logger Implementation
Formatting XSQL Action Handler Errors
Displaying Error Information on Screen
XSQL Servlet Limitations and Hints
HTTP Parameters with Multibyte Names
CURSOR() Function in SQL Statements
Hints for Using the XSQL Servlet
Specifying a DTD While Transforming XSQL Output to a WML Document
Writing XSQL Servlet Conditional Statements
Using a Value Retrieved in One Query in Another Query's Where Clause
Using the XSQL Servlet with Non-Oracle Databases
Handling Multi-Valued HTML Form Parameters
Running the XSQL Servlet with Oracle Release 7.3
Out Variable is not Supported in <xsql:dml>
Receiving "Unable to Connect" Errors
Using Other File Extensions Besides .xsql
Receiving "No Posted Document to Process" when you Try to Post XML
XSQL Supports SOAP
Passing the Connection for XSQL
Controlling How Database Connections and Passwords Are Stored
Accessing Authentication Information in a Custom Connection Manager
Retrieving the Name of the Current XSQL Page
Resolving Errors When Using the FOP Serializer
Tuning XSQL Pages for Fastest Performance
Using XSQL with Other Connection Pool Implementations
Including XML Documents Stored in CLOBs in Your XSQL Page
Combining JavaServer Pages and XSQL in the Same Page
Choosing a Stylesheet Based on Input Arguments
Sorting the Result Within the Page

9 Pipeline Definition Language for Java

Using Pipeline Definition Language
Example of a Pipeline Definition Language Application
The Command-line Pipeline Tool orapipe

10 XDK JavaBeans

Accessing Oracle XDK JavaBeans
Database Connectivity
XDK JavaBeans Overview
DOMBuilder
XSLTransformer
DBAccess
XMLDiff
XMLCompress
XMLDBAccess
XSDValidator
DOMBuilder JavaBean
Use for Asynchronous Parsing in the Background
DOMBuilder JavaBean Usage
XSLTransformer JavaBean
XSLTransformer JavaBean: Regenerating HTML Only When Data Changes
How to Use XSLTransformer JavaBean
DBAccess JavaBean
DBAcess JavaBean Usage
XMLDiff JavaBean
XMLCompress JavaBean
XMLDBAccess JavaBean
XSDValidator JavaBean
JavaBean Examples
Installing the JavaBean Examples
XMLDiffSample.java
XSDValidatorSample.java

11 Using XDK and SOAP

What Is SOAP?
What Are UDDI and WSDL?
What Is Oracle SOAP?
How Does Oracle SOAP Work?
Oracle SOAP and IDAP
What Is a SOAP Client?
SOAP Client API
What Is a SOAP Server?
Oracle SOAP Security Features
SOAP Transports
Administrative Clients
SOAP Request Handler
SOAP Provider Interface and Providers
Provider Interface
Provider Deployment Administration
SOAP Services Provided
Advantages of XML Over EDI
SOAP Example
XML Features Used in the SOAP Example
Prerequisite Software for the SOAP Example
How Is the SOAP Example Implemented?
Setting Up the Tables and the SOAP Service
Requesting SOAP Service
Initializing the MessageDispatcher Process
Compressing the XML Document
Creating a SOAP Message
Enqueuing the XML Document
Listing of the Java Source File inserItemServlet.java
Queuing Messages with AQ
XML Compression
Listing of the Java Source File MessageBroker.java
Summary of the SOAP Example

12 TransX Utility

Overview of the TransX Utility
Primary TransX Utility Features
Simplified Multilingual Data Loading
Simplified Data Format Support and Interface
Loading Dataset in the Standard XML Format
Handling Existing Data
Other TransX Utility Features
Installing TransX Utility
Dependencies of TransX
Installing TransX Using the Oracle Installer
Installing TransX Downloaded from OTN
To Use the TransX Front-end or Its Java API:
TransX Utility Command-Line Syntax
TransX Utility Command-Line Examples
TransX Utility Command-line Parameters
TransX Utility Command-line Options
Sample Code for TransX Utility

13 Getting Started with XDK C Components

Specifications of XDK C/C++ Components
What Are the XDK C Components
Installing the C Components of XDK
Setting the UNIX Environment
Command Line Environment Setup
Setting the Windows Environment
Environment for Command Line Usage
Using the XDK C Components with Visual C++
Globalization Support for the C XDK Components

14 XML Parser for C

What Is the Unified C API for XDK and Oracle XML DB?
Using DOM for XDK
Loading an XML Document with the C API
Data Encoding of XML Documents for the C API
NULL-Terminated and Length-Encoded C API Functions
Error Handling
Installing the C API
Using OCI and the C API
XML Context
Creating XMLType Instances on the Client
XML Data on the Server
XMLType Functions and Descriptions
OCI Examples
Using the XML Parser for C
Memory Allocation
Thread Safety
Data Types Index
Error Message Files
XML Parser for C Calling Sequence
Parser Calling Sequence
XML Parser for C Default Behavior
DOM and SAX APIs Compared
Using the SAX API
SAX Callback Structure
Command Line Usage
Writing C Code to Use Supplied APIs
Using the Sample Files

15 XSLT Processors for C

XVM Processor
XVM Usage Example
Command-Line Access of the XVM Processor
Accessing XVM Processor for C
XSL Processor
XSL Processor Usage Example
XPath Processor Usage Example
Command Line Usage of the XSL Processor
Accessing Oracle XSL Processor for C
Using the Demo Files Included with the Software
Building the C Demo Programs for XSLT

16 XML Schema Processor for C

Oracle XML Schema Processor for C
Oracle XML Schema for C Features
Standards Conformance
XML Schema Processor for C: Supplied Software
Invoking XML Schema Processor for C
XML Schema Processor for C Usage Diagram
How to Run XML Schema for C Sample Programs

17 Getting Started with XDK C++ Components

Installation of the XDK C++ Components
Getting the C++ Components of XDK
Libraries in the UNIX Environment for C++ XDK
Setting the UNIX Environment for C++
Command Line Environment Setup
Windows Environment Setup for C++ XDK
Environment for Command Line Usage on Windows
Setting the Windows Environment for C++ XDK
Using XDK C++ Components with Visual C++

18 Unified C++ Interfaces

What is the Unified C++ API?
Accessing the C++ Interface
OracleXML Namespace
OracleXML Interfaces
Ctx Namespace
OracleXML Datatypes
Ctx Interfaces
IO Namespace
IO Datatypes
IO Interfaces
Tools Package
Tools Interfaces
Error Message Files

19 XML Parser for C++

Introduction to Parser for C++
Dom Namespace
DOM Datatypes
DOM Interfaces
DOM Traversal and Range Datatypes
DOM Traversal and Range Interfaces
Parser Namespace
GParser Interface
DOMParser Interface
SAXParser Interface
SAX Event Handlers
Thread Safety
XML Parser for C++ Usage
XML Parser for C++ Default Behavior
C++ Sample Files

20 XSLT Processor for C++

Accessing XSLT for C++
Xsl Namespace
Xsl Interfaces
XSLT for C++ DOM Interface Usage
Invoking XSLT for C++
Command Line Usage
Writing C++ Code to Use Supplied APIs
Using the Sample Files Included with the Software

21 XML Schema Processor for C++

Oracle XML Schema Processor for C++
Oracle XML Schema for C++ Features
Online Documentation
Standards Conformance
XML Schema Processor API
Invoking XML Schema Processor for C++
Running the Provided XML Schema for C++ Sample Programs

22 XPath Processor for C++

XPath Interfaces
Sample Programs

23 XML Class Generator for C++

Accessing XML C++ Class Generator
Using XML C++ Class Generator
External DTD Parsing
Error Message Files
XML C++ Class Generator Usage
Input to the XML C++ Class Generator
Using the XML C++ Class Generator Examples
XML C++ Class Generator Example 1: XML — Input File to Class Generator, CG.xml
XML C++ Class Generator Example 2: DTD — Input File to Class Generator, CG.dtd
XML C++ Class Generator Example 3: CG Sample Program

24 XSU for PL/SQL

XSU PL/SQL API
Generating XML with DBMS_XMLQuery()
XSU Generating XML Example 1: Generating XML from Simple Queries (PL/SQL)
XSU Generating XML Example 2: Printing CLOB to Output Buffer
XSU Generating XML Example 3: Changing ROW and ROWSET Tag Names
XSU Generating XML Example 4: Using setMaxRows() and setSkipRows()
Setting Stylesheets in XSU (PL/SQL)
Binding Values in XSU (PL/SQL)
XSU Generating XML Example 5: Binding Values to the SQL Statement
Storing XML in the Database Using DBMS_XMLSave
Insert Processing Using XSU (PL/SQL API)
XSU Inserting XML Example 6: Inserting Values into All Columns (PL/SQL)
XSU Inserting XML Example 7: Inserting Values into Certain Columns (PL/SQL)
Update Processing Using XSU (PL/SQL API)
XSU Updating XML Example 8: Updating XML Document Key Columns (PL/SQL)
XSU Updating XML Example 9: Specifying a List of Columns to Update (PL/SQL)
Delete Processing Using XSU (PL/SQL API)
XSU Deleting XML Example 10: Deleting Operations for Each Row (PL/SQL)
XSU Example 11: Deleting by Specifying the Key Values (PL/SQL)
XSU Deleting XML Example 12: Reusing the Context Handle (PL/SQL)
XSU Exception Handling in PL/SQL

Glossary

Index