文档介绍:XML and Oracle: An Overview
Roger Schrag
Database Specialists, Inc.
XML and Oracle: An Overview
XML Basics
XML’s Potential
Support for XML in Oracle Products
/ 天津塔吊租赁河北塔吊租赁西安塔吊租赁塔吊租赁/
What Is XML?
A standard for representing structured data in human-readable text form
Any type of data can be represented in XML
Syntax uses open and close tags similar to HTML
Use mon in your industry or make up your own
Extensible Markup Language
XML Basics
XML Documents
Document Type Definitions
Document Object Model
Simple API for XML
Transformations
XML Documents
An XML document is one logical unit of data marked up in XML, such as a purchase order or a stock quote.
An XML datagram is a packet of data containing an XML document that is being transported between systems.
An XML document is said to be well formed if it adheres to all of the syntax rules of XML.
A Sample XML Document
<?xml version=""?>
<!DOCTYPE drink-recipe SYSTEM "drink-">
<drink-recipe name="Fuzzy Navel">
<ingredients>
<ingredient quantity="1" unit="ounce">
Vodka </ingredient>
<ingredient quantity="1" unit="ounce">
Peach schnapps </ingredient>
<ingredient quantity="4" unit="ounce">
Orange juice </ingredient>
</ingredients>
<preparation>
<step>
Pour ingredients into a highball glass almost filled with ice.
</step>
<step>
Stir.
</step>
</preparation>
</drink-recipe>
Document Type Definition (DTD)
What tags are allowed
What attributes are allowed within each tag
Which elements are required and which are optional
Which tags may be nested inside of other tags
A roadmap for how to interpret a specific type of XML document:
A Sample DTD
<!ELEMENT drink-recipe (ingredients, preparation)>
<!ATTLIST drink-recipe name CDATA #IMPLIED>
<!ELEMENT ingredients (ingredient+)>
<!ELEMENT ingredient (#PCDATA)>
<!ATTLIST ingredient quantity CDATA #IMPLIED
unit CDATA #IMPLIED>
<!ELEMENT preparation (step+)>
<!ELEMENT step (#PCDATA)>
What Can You Do With An XML Document?
Anything