
Oracle® XML Developer's Kit Programmer's Guide 18c E83708-05 January 2020 Oracle XML Developer's Kit Programmer's Guide, 18c E83708-05 Copyright © 2001, 2020, Oracle and/or its affiliates. All rights reserved. Primary Authors: Drew Adams, Lance Ashdown, Janis Greenberg, Sheila Moore, Sue Pelski Contributors: Nipun Agarwal, Geeta Arora, Vikas Arora, Thomas Baby, Janet Blowney, Dan Chiba, Steve Ding, Mark Drake, Beda Hammerschmidt, Bill Han, Roza Leyderman, Dmitry Lychagin, Valarie Moore, Steve Muench, Ravi Murthy, Maxim Orgiyan, Mark Scardina, Helen Slattery, Joshua Spiegel, Asha Tarachandani, Jinyu Wang, Simon Wong, Tim Yu, Kongyi Zhou This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency- specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle. Contents Preface Audience xxxv Documentation Accessibility xxxv Related Documents xxxv Examples xxxvi Conventions xxxvi Changes in This Release for Oracle XML Developer's Kit Programmer's Guide Changes in Oracle XML Developer’s Kit Release 18c, Version 1 xxxvii Changes in Oracle XML Developer’s Kit 12c Release 2 (12.2.0.1) xxxvii Changes in Oracle XML Developer's Kit 12c Release 1 (12.1.0.1) xxxviii 1 Introduction to Oracle XML Developer's Kit 1.1 Overview of XDK 1-1 1.2 XDK Components 1-3 1.2.1 XML Parsers 1-4 1.2.2 XSLT Processors 1-5 1.2.3 XML Schema Processors 1-6 1.2.4 XML Class Generators 1-6 1.2.5 XML Pipeline Processor 1-7 1.2.6 Oracle XML SQL Utility 1-7 1.2.6.1 XML Document Representations 1-8 1.2.6.2 Using XSU with an XML Class Generator 1-8 1.2.7 TransX Utility Overview 1-9 1.2.8 XSQL Pages Publishing Framework 1-9 1.2.9 SOAP Services 1-10 1.2.10 XSLT Virtual Machine 1-10 1.3 Generating XML Documents Using XDK 1-11 1.3.1 XML Document Generation with Java 1-11 1.3.2 XML Document Generation with C 1-12 iii 1.3.3 XML Document Generation with C++ 1-13 1.4 Development Tools and Frameworks for XDK 1-14 1.4.1 Oracle JDeveloper 1-15 1.4.2 Oracle Data Provider for .NET 1-16 1.5 About Installing XDK 1-17 2 Security Considerations for Oracle XML Developer's Kit 2.1 Implementing Security for Java 2-1 2.1.1 Securing XSLT Processing with Oracle XML Developer's Kit 2-1 2.1.2 Using the Oracle XML Parser Safely 2-2 2.2 Implementing Security for C 2-4 2.3 Security for C++ 2-5 Part I Oracle XML Developer's Kit for C 3 Getting Started with Oracle XML Developer's Kit for C 3.1 Installing XDK for C Components 3-1 3.2 Configuring the UNIX Environment for XDK for C Components 3-3 3.2.1 XDK for C Component Dependencies on UNIX 3-3 3.2.2 Setting Up XDK for C Environment Variables on UNIX 3-4 3.2.3 Testing the XDK for C Runtime Environment on UNIX 3-4 3.2.4 Setting Up and Testing the XDK C Compile-Time Environment on UNIX 3-5 3.2.4.1 Testing the XDK for C Compile-Time Environment on UNIX 3-5 3.2.5 Verifying the XDK for C Component Version on UNIX 3-6 3.3 Configuring the Windows Environment for XDK C Components 3-6 3.3.1 XDK for C Component Dependencies on Windows 3-6 3.3.2 Setting Up XDK for C Environment Variables on Windows 3-7 3.3.3 Testing the XDK for C Runtime Environment on Windows 3-7 3.3.4 Setting Up and Testing the XDK for C Compile-Time Environment on Windows 3-8 3.3.4.1 Testing the XDK for C Compile-Time Environment on Windows 3-8 3.3.5 Using the XDK for C Components and Visual C++ in Microsoft Visual Studio 3-9 3.3.5.1 Setting a Path for a Project in Visual C++ on Windows 3-10 3.3.5.2 Setting the Library Path in Visual C++ on Windows 3-11 3.4 Overview of the Unified C API 3-12 3.5 Globalization Support for the XDK for C Components 3-13 iv 4 Using the XSLT and XVM Processors for C 4.1 XSLT XVM Processor 4-1 4.1.1 XVM Usage Example 4-1 4.1.2 Using the XVM Processor Command-Line Utility 4-3 4.1.3 Accessing the XVM Processor for C 4-3 4.2 XSLT Processor for XDK for C 4-3 4.2.1 XSLT Processor Usage Example 4-4 4.2.2 XPath Processor Usage Example 4-4 4.2.3 Using the C XSLT Processor Command-Line Utility 4-5 4.2.4 Accessing Oracle XSLT processor for C 4-6 4.3 Using the Demo Files Included with the Software 4-6 4.3.1 Building the C Demo Programs for XSLT 4-7 5 Using the XML Parser for C 5.1 Introduction to the XML Parser for C 5-1 5.1.1 Prerequisites for Using the XML Parser for C 5-1 5.1.2 Standards and Specifications for the XML Parser for C 5-1 5.2 Using the XML Parser API for C 5-2 5.2.1 Overview of the Parser API for C 5-2 5.2.1.1 XML Parser for C Data Types 5-3 5.2.1.2 XML Parser for C Defaults 5-4 5.2.2 XML Parser for C Calling Sequence 5-4 5.2.3 Using the XML Parser for C: Basic Process 5-6 5.2.4 Running the XML Parser for C Demo Programs 5-8 5.2.5 Using the C XML Parser Command-Line Utility 5-9 5.2.5.1 Using the XML Parser Command-Line Utility: Example 5-10 5.3 Using the DOM API for C 5-11 5.3.1 Controlling the Data Encoding of XML Documents for the C API 5-11 5.3.2 Using NULL-Terminated and Length-Encoded C API Functions 5-12 5.3.3 Handling Errors with the C API 5-13 5.4 Using orastream Functions 5-13 5.5 Using the SAX API for C 5-17 5.6 Using the XML Pull Parser for C 5-17 5.6.1 Using Basic XML Pull Parsing Capabilities 5-17 5.6.1.1 XML Event Context 5-17 5.6.1.2 About the XML Event Context 5-18 5.6.2 Parsing Multiple XML Documents 5-18 5.6.3 ID Callback 5-19 5.6.4 Error Handling for the XML Pull Parser 5-19 5.6.4.1 Parser Errors 5-19 v 5.6.4.2 Programming Errors 5-20 5.6.5 Sample Pull Parser Application 5-20 5.7 Using OCI and the XDK for C API 5-22 5.7.1 Using XMLType Functions and Descriptions 5-22 5.7.2 Initializing an XML Context for Oracle XML DB 5-23 5.7.3 Creating XMLType Instances on the Client 5-23 5.7.4 Operating on XML Data in the Database Server 5-24 5.7.5 Using OCI and the XDK for C API: Examples 5-24 6 Using Binary XML with C 6.1 Introduction to Binary XML for C 6-1 6.2 Prerequisites for Using Binary XML with C 6-1 6.3 Binary XML Storage Format – C 6-1 7 Using the XML Schema Processor for C 7.1 Oracle XML Schema Processor for C 7-1 7.1.1 Oracle XML Schema for C Features 7-1 7.1.2 Standards Conformance for Oracle XML Schema Processor for C 7-2 7.1.3 XML Schema Processor for C: Supplied Software 7-2 7.2 Using the C XML Schema Processor Command-Line Utility 7-3 7.3 XML Schema Processor for C Usage Diagram 7-3 7.4 How to Run XML Schema for C Sample Programs 7-4 7.5 What Is the Streaming Validator? 7-5 7.5.1 Using Transparent Mode 7-5 7.5.1.1 Error Handling in Transparent Mode 7-5 7.5.1.2 Streaming Validator Example 7-6 7.5.2
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages682 Page
-
File Size-