没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Oracle官方文档 介绍Oracle XML 相关内容,注意此文档为英文版 包括 在ORACLE通过相关函数解析XML 如:xmltype、extract 、EXISTSNODE、EXTRACTVALUE等 案例多,这本手册适合需要在Oralce数据库里解析和处理xml 的同学学习。
资源推荐
资源详情
资源评论
Oracle® XML DB
Developer's Guide
10g Release 2 (10.2)
B14259-02
August 2005
This manual describes Oracle XML DB. It includes guidelines
and examples for loading, storing, generating, manipulating,
managing, accessing, and querying XML data in Oracle
Database.
Oracle XML DB Developer’s Guide, 10g Release 2 (10.2)
B14259-02
Copyright © 2002, 2005, Oracle. All rights reserved.
Primary Author: Drew Adams
Contributing Author: Nipun Agarwal, Abhay Agrawal, Omar Alonso, David Anniss, Sandeepan Banerjee,
Mark Bauer, Ravinder Booreddy, Stephen Buxton, Yuen Chan, Sivasankaran Chandrasekar, Vincent Chao,
Ravindranath Chennoju, Dan Chiba, Mark Drake, Fei Ge, Wenyun He, Shelley Higgins, Thuvan Hoang, Sam
Idicula, Namit Jain, Neema Jalali, Bhushan Khaladkar, Viswanathan Krishnamurthy, Muralidhar
Krishnaprasad, Geoff Lee, Wesley Lin, Annie Liu, Anand Manikutty, Jack Melnick, Nicolas Montoya, Steve
Muench, Ravi Murthy, Eric Paapanen, Syam Pannala, John Russell, Eric Sedlar, Vipul Shah, Cathy Shea,
Asha Tarachandani, Tarvinder Singh, Simon Slack, Muralidhar Subramanian, Asha Tarachandani, Priya
Vennapusa, James Warner
Contributor: Reema Al-Shaikh, Harish Akali, Vikas Arora, Deanna Bradshaw, Paul Brandenstein, Lisa
Eldridge, Craig Foch, Wei Hu, Reema Koo, Susan Kotsovolos, Sonia Kumar, Roza Leyderman, Zhen Hua
Liu, Diana Lorentz, Yasuhiro Matsuda, Valarie Moore, Bhagat Nainani, Visar Nimani, Sunitha Patel, Denis
Raphaely, Rebecca Reitmeyer, Ronen Wolf
The Programs (which include both the software and documentation) contain proprietary information; they
are provided under a license agreement containing restrictions on use and disclosure and are also protected
by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly,
or decompilation of the Programs, except to the extent required to obtain interoperability with other
independently created software or as specified by law, is prohibited.
The information contained in this document is subject to change without notice. If you find any problems in
the documentation, please report them to us in writing. This document is not warranted to be error-free.
Except as may be expressly permitted in your license agreement for these Programs, no part of these
Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose.
If the Programs are delivered to the United States Government or anyone licensing or using the Programs on
behalf of the United States Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data
delivered to U.S. Government customers are "commercial computer software" or "commercial technical data"
pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As
such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation
and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license
agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial
Computer Software—Restricted Rights (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City,
CA 94065
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup,
redundancy and other measures to ensure the safe use of such applications if the Programs are used for such
purposes, and we disclaim liability for any damages caused by such use of the Programs.
Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective owners.
The Programs may provide links to Web sites and access to content, products, and services from third
parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites.
You bear all risks associated with the use of such content. If you choose to purchase any products or services
from a third party, the relationship is directly between you and the third party. Oracle is not responsible for:
(a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the
third party, including delivery of products or services and warranty obligations related to purchased
products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from
dealing with any third party.
iii
Contents
Preface ........................................................................................................................................................... xxxv
Audience................................................................................................................................................. xxxv
Documentation Accessibility............................................................................................................... xxxv
Structure ................................................................................................................................................. xxxvi
Related Documents ..................................................................................................................................... xl
Conventions ............................................................................................................................................... xlii
What's New In Oracle XML DB? ......................................................................................................... xlv
Oracle Database 10g Release 2 (10.2) New Features in Oracle XML DB........................................... xlv
Oracle Database 10g Release 1 (10.1) New Features in Oracle XML DB......................................... xlvii
Oracle Text Enhancements.................................................................................................................... xlviii
Oracle Streams Advanced Queuing (AQ) Support........................................................................... xlviii
Oracle XDK Support for XMLType ..................................................................................................... xlviii
Part I Oracle XML DB Basics
1 Introduction to Oracle XML DB
Features of Oracle XML DB.................................................................................................................... 1-1
Oracle XML DB Architecture ................................................................................................................. 1-2
XMLType Storage .............................................................................................................................. 1-4
APIs for XML...................................................................................................................................... 1-5
XML Schema Catalog Views ............................................................................................................ 1-6
Views RESOURCE_VIEW and PATH_VIEW................................................................................ 1-7
Overview of Oracle XML DB Repository ....................................................................................... 1-7
Accessing and Manipulating XML in the Oracle XML DB Repository .............................. 1-7
XML Services ............................................................................................................................... 1-8
Oracle XML DB Repository Architecture................................................................................ 1-8
How Does Oracle XML DB Repository Work?....................................................................... 1-9
Oracle XML DB Protocol Architecture ................................................................................. 1-10
Programmatic Access to Oracle XML DB (Java, PL/SQL, and C)........................................... 1-11
Oracle XML DB Features ..................................................................................................................... 1-11
XMLType Datatype......................................................................................................................... 1-12
XML Schema Support..................................................................................................................... 1-13
Structured Versus Unstructured Storage .................................................................................... 1-15
XML/SQL Duality .......................................................................................................................... 1-16
iv
SQL/XML INCITS Standard SQL Functions.............................................................................. 1-17
Rewriting of XPath Expressions: XPath Rewrite........................................................................ 1-18
Oracle XML DB Benefits...................................................................................................................... 1-19
Unifying Data and Content with Oracle XML DB ..................................................................... 1-20
Exploiting Database Capabilities........................................................................................... 1-21
Exploiting XML Capabilities .................................................................................................. 1-22
Oracle XML DB Offers Faster Storage and Retrieval of Complex XML Documents............ 1-23
Oracle XML DB Helps You Integrate Applications ................................................................... 1-23
When Your Data Is Not XML You Can Use XMLType Views................................................. 1-23
Searching XML Data Stored in CLOBs Using Oracle Text............................................................ 1-24
Building Messaging Applications using Oracle Streams Advanced Queuing......................... 1-24
Requirements for Running Oracle XML DB ................................................................................... 1-24
Standards Supported by Oracle XML DB ........................................................................................ 1-25
Oracle XML DB Technical Support.................................................................................................... 1-25
Oracle XML DB Examples Used in This Manual............................................................................ 1-26
Further Oracle XML DB Case Studies and Demonstrations......................................................... 1-26
2 Getting Started with Oracle XML DB
Oracle XML DB Installation................................................................................................................... 2-1
When to Use Oracle XML DB ................................................................................................................ 2-1
Designing Your XML Application ........................................................................................................ 2-2
Oracle XML DB Design Issues: Introduction ..................................................................................... 2-2
A. Data ................................................................................................................................................. 2-2
B. Access .............................................................................................................................................. 2-3
C. Application Language .................................................................................................................. 2-3
D. Processing....................................................................................................................................... 2-3
E. Storage............................................................................................................................................. 2-3
Oracle XML DB Application Design: A. How Structured Is Your Data? ...................................... 2-4
XML Schema-Based or Non-Schema-Based................................................................................... 2-4
Oracle XML DB Application Design: B. Access Models .................................................................. 2-5
Oracle XML DB Application Design: C. Application Language .................................................... 2-6
Oracle XML DB Application Design: D. Processing Models .......................................................... 2-6
Messaging Options ............................................................................................................................ 2-7
Oracle XML DB Application Design: F. Storage Models.................................................................. 2-8
Using XMLType Tables..................................................................................................................... 2-8
Using XMLType Views ..................................................................................................................... 2-9
Oracle XML DB Performance................................................................................................................. 2-9
XML Storage Requirements........................................................................................................... 2-10
XML Memory Management .......................................................................................................... 2-10
XML Parsing Optimizations.......................................................................................................... 2-11
Node-Searching Optimizations..................................................................................................... 2-11
XML Schema Optimizations.......................................................................................................... 2-11
Load Balancing Through Cached XML Schema......................................................................... 2-12
Reduced Bottlenecks From Code That Is Not Native................................................................ 2-12
Reduced Java Type Conversion Bottlenecks............................................................................... 2-12
v
3 Using Oracle XML DB
Storing XML as XMLType....................................................................................................................... 3-2
What is XMLType?............................................................................................................................. 3-2
Benefits of the XMLType Datatype and API.................................................................................. 3-3
When to Use XMLType..................................................................................................................... 3-3
Two Ways to Store XMLType Data: LOBs and Structured.......................................................... 3-3
Advantages and Disadvantages of XML Storage Options in Oracle XML DB......................... 3-4
When to Use CLOB Storage for XMLType .................................................................................... 3-4
Creating XMLType Tables and Columns............................................................................................. 3-4
Loading XML Content into Oracle XML DB....................................................................................... 3-5
Loading XML Content Using SQL or PL/SQL.............................................................................. 3-5
Loading XML Content Using Java................................................................................................... 3-6
Loading XML Content Using C ....................................................................................................... 3-6
Loading Large XML Files That Contain Small XML Documents ............................................... 3-8
Loading Large XML Files Using SQL*Loader ............................................................................... 3-9
Loading XML Documents into the Repository Using DBMS_XDB............................................ 3-9
Loading Documents into the Repository Using Protocols........................................................... 3-9
Character Sets of XML Documents.................................................................................................... 3-10
XML Encoding Declaration ........................................................................................................... 3-10
Character-Set Determination When Loading XML Documents into the Database............... 3-11
Character-Set Determination When Retrieving XML Documents from the Database ......... 3-12
Overview of the W3C XML Schema Recommendation................................................................. 3-13
XML Instance Documents.............................................................................................................. 3-13
XML Schema for Schemas.............................................................................................................. 3-13
Editing XML Schemas .................................................................................................................... 3-13
XML Schema Features.................................................................................................................... 3-13
Text Representation of the PurchaseOrder XML Schema.................................................. 3-13
Graphical Representation of the Purchase-Order XML Schema....................................... 3-16
Using XML Schema with Oracle XML DB ....................................................................................... 3-17
Why Use XML Schema With Oracle XML DB? .......................................................................... 3-17
Validating Instance Documents with XML Schema........................................................... 3-18
Constraining Instance Documents for Business Rules or Format Compliance .............. 3-18
Defining How XMLType Contents Must be Stored in the Database ............................... 3-18
Structured Storage of XML Documents....................................................................................... 3-18
Annotating an XML Schema to Control Naming, Mapping, and Storage ............................. 3-19
Controlling How XML Collections are Stored in the Database ............................................... 3-19
Collections: Default Mapping ................................................................................................ 3-19
Declaring the Oracle XML DB Namespace ................................................................................. 3-19
Registering an XML Schema with Oracle XML DB ................................................................... 3-23
SQL Types and Tables Created During XML Schema Registration................................. 3-24
Working with Large XML Schemas ...................................................................................... 3-25
Working with Global Elements.............................................................................................. 3-26
Creating XML Schema-Based XMLType Columns and Tables................................................ 3-27
Default Tables.................................................................................................................................. 3-28
Identifying XML Schema Instance Documents .............................................................................. 3-28
Attributes noNamespaceSchemaLocation and schemaLocation ............................................ 3-29
Dealing with Multiple Namespaces............................................................................................. 3-30
剩余851页未读,继续阅读
资源评论
redchenwei
- 粉丝: 0
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功