XML Schema

From Oracle FAQ
⧼orafaq-jumptonavigation⧽⧼orafaq-jumptosearch⧽

A DTD cannot easily be converted into a CREATE TABLE statement as DTD's only describe character data. The W3C defined a XML language called XML Schema that can better describe data (with proper data types).

XML Schemas can easily be converted into CREATE TABLE statements. Look at this example:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
  elementFormDefault="qualified" attributeFormDefault="unqualified">

  <xs:element name="FAQ-LIST">
	<xs:annotation>
		<xs:documentation>Example XML schema</xs:documentation>
	</xs:annotation>

	<xs:complexType>
		<xs:sequence maxOccurs="unbounded">
			<xs:element name="QUESTION">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="QUERY"/>
						<xs:element name="RESPONSE"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
  </xs:element>
</xs:schema>

Note: It is quite difficult to compile XML Schemas by hand. Best would be to get a tool like XMLSpy to help you to get the job done.

Glossary of Terms
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #