Oracle® XML DB Developer's Guide 11g Release 2 (11.2) Part Number E10492-02 |
|
|
View PDF |
This manual describes Oracle XML DB, and how you can use it to store, generate, manipulate, manage, and query XML data in the database.
After introducing you to the heart of Oracle XML DB, namely the XMLType
framework and Oracle XML DB repository, the manual provides a brief introduction to design criteria to consider when planning your Oracle XML DB application. It provides examples of how and where you can use Oracle XML DB.
The manual then describes ways you can store and retrieve XML data using Oracle XML DB, APIs for manipulating XMLType
data, and ways you can view, generate, transform, and search on existing XML data. The remainder of the manual discusses how to use Oracle XML DB repository, including versioning and security, how to access and manipulate repository resources using protocols, SQL, PL/SQL, or Java, and how to manage your Oracle XML DB application using Oracle Enterprise Manager. It also introduces you to XML messaging and Oracle Streams Advanced Queuing XMLType
support.
This Preface contains these topics:
Oracle XML DB Developer's Guide is intended for developers building XML Oracle Database applications.
An understanding of XML, XML Schema, XQuery, XPath, and XSL is helpful when using this manual.
Many examples provided here are in SQL, PL/SQL, Java, or C. A working knowledge of one of these languages is presumed.
Our goal is to make Oracle products, services, and supporting documentation accessible to all users, including users that are disabled. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For more information, visit the Oracle Accessibility Program Web site at http://www.oracle.com/accessibility/
.
Accessibility of Code Examples in Documentation
Screen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.
Accessibility of Links to External Web Sites in Documentation
This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.
Deaf/Hard of Hearing Access to Oracle Support Services
To reach Oracle Support Services, use a telecommunications relay service (TRS) to call Oracle Support at 1.800.223.1711. An Oracle Support Services engineer will handle technical issues and provide customer support according to the Oracle service request process. Information about TRS is available at http://www.fcc.gov/cgb/consumerfacts/trs.html
, and a list of phone numbers is available at http://www.fcc.gov/cgb/dro/trsphonebk.html
.
For more information, see these Oracle resources:
Oracle Database New Features Guide for information about the differences between Oracle Database 11g and the Oracle Database 11g Enterprise Edition and the available features and options. This book also describes features new to Oracle Database 11g Release 2 (11.2).
Oracle Database Error Messages. Oracle Database error message documentation is available only as HTML. If you have access to only printed or PDF Oracle Database documentation, you can browse the error messages by range. Once you find the specific range, use the search (find) function of your Web browser to locate the specific message. When connected to the Internet, you can search for a specific error message using the error message search feature of the Oracle Database online documentation.
Many of the examples in this book use the sample schemas, which are installed by default when you select the Basic Installation option with an Oracle Database installation. Refer to Oracle Database Sample Schemas for information about how these schemas were created and how you can use them yourself.
Printed documentation is available for sale in the Oracle Store at
http://oraclestore.oracle.com/
To download free release notes, installation documentation, white papers, or other collateral, please visit the Oracle Technology Network (OTN). You must register online before using OTN; registration is free and can be done at
http://www.oracle.com/technology/membership/
If you already have a username and password for OTN, then you can go directly to the documentation section of the OTN Web site at
http://www.oracle.com/technology/documentation/
For additional information, see:
http://www.w3.org/XML/Schema
– XML Schema
http://www.w3.org/2001/XMLSchema
– XML Schema
http://www.w3.org/TR/xmlschema-0/
– XML Schema: primer
http://www.w3.org/TR/xmlschema-1/
– XML Schema: structures
http://www.w3.org/TR/xmlschema-2/
– XML Schema: data types
http://www.oasis-open.org/cover/schemas.html
– XML Schema
http://www.xml.com/pub/a/2000/11/29/schemas/part1.html
– XML Schema
http://xml.coverpages.org/xmlMediaMIME.html
– media/MIME types
http://www.w3.org/TR/xptr/
– XPointer
http://www.w3.org/TR/xpath
– XPath 1.0
http://www.w3.org/TR/xpath20/
– XPath 2.0
http://www.zvon.org/xxl/XPathTutorial/General/examples.html
– XPath
XML In a Nutshell, by Elliotte Rusty Harold and W. Scott Means, O'Reilly, January 2001, http://www.oreilly.com/catalog/xmlnut/chapter/ch09.html
http://www.w3.org/TR/2002/NOTE-unicode-xml-20020218/
– Unicode in XML
http://www.w3.org/TR/REC-xml-names/
– namespaces
http://www.w3.org/TR/xml-infoset/
– information sets
http://www.w3.org/TR/xslt
– XSLT
http://www.zvon.org/HTMLonly/XSLTutorial/Books/Book1/index.html
– XSL
http://www.w3.org/2002/ws/Activity.html
– Web services
http://www.ietf.org/rfc/rfc959.txt
– RFC 959: FTP Protocol Specification
ISO/IEC 13249-2:2000, Information technology - Database languages - SQL Multimedia and Application Packages - Part 2: Full-Text, International Organization For Standardization, 2000
Note:
Throughout this manual, "XML Schema" refers to the XML Schema 1.0 recommendation,http://www.w3.org/XML/Schema
.The following text conventions are used in this document:
Convention | Meaning |
---|---|
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary. |
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values. |
monospace |
Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter. |
The code examples in this book are for illustration only. In many cases, however, you can copy and paste parts of examples and run them in your environment.
Many of the examples in this book use the standard database schemas that are included in your database. In particular, database schema OE
contains XML purchase-order documents in XMLType
table purchaseorder
, and XML documents with warehouse information in XMLType
column warehouse_spec
of table warehouses
.
The purchase-order documents are also contained in Oracle XML DB Repository, under the repository path /home/OE/PurchaseOrders/2002/
. The XML schema that governs these documents is file purchaseorder.xsd
, at repository location /home/OE/purchaseorder.xsd
. An XSL style sheet that is used in some examples to transform purchase-order documents is file purchaseorder.xsl
, at repository location /home/OE/purchaseorder.xsl
. This XML schema and style sheet can also be found in Appendix A, "Oracle-Supplied XML Schemas and Examples".
See Also:
Oracle Database Sample Schemas for information about database schema HR
Oracle Database Sample Schemas for information about database schema OE
To promote readability, especially of lengthy or complex XML data, output is sometimes shown pretty-printed (formatted) in code examples.
Some of the code examples in this book present execution plans. These are for illustration only. Running examples that are presented here in your environment is likely to result in different execution plans from those presented here.
When examining the examples in this book, keep in mind the following:
SQL is case-insensitive, but names in SQL code are implicitly uppercase, unless you enclose them in double-quotes.
XML is case-sensitive. You must refer to SQL names in XML code using the correct case: uppercase SQL names must be written as uppercase.
For example, if you create a table named my_table
in SQL without using double-quotes, then you must refer to it in XML code as "MY_TABLE
".
Syntax descriptions are provided in this book for various SQL, PL/SQL, or other command-line constructs in graphic form or Backus Naur Form (BNF). See Oracle Database SQL Language Reference for information about how to interpret these descriptions.