
Chapter 2 XML Model Basics
About XML
Why use XML?
The eXtensible Markup Language is used for different reasons:
- It describes and structures data, whereas HTML only displays data
- It uses a self-describing and personalized syntax
- It can be exchanged between incompatible systems, since data is stored in plain text format
DTD, XSD or XDR
The structure of an XML model is described by a DTD, an XSD or an XDR file:
- A DTD file is a basic way to describe the structure of an XML document. It is a raw list of all the legal elements making up an XML document
Extract of a DTD file:
- An XSD file (or schema) is an elaborated way to describe the structure of an XML document. It can support namespaces, derivations, keys, simple and complex user-defined data types and a robust collection of predefined data types
Extract of an XSD file:
An XSD file always starts with the <schema> tag (root element). All objects created in the model will appear in the XSD file between the schema start-tag and end-tag
- An XDR file is a simplified XSD file (or schema). It does not support simple and complex user-defined data types
Extract of an XDR file:
An XDR file always starts with the <schema> tag (root element). All objects created in the model will appear in the XDR file between the schema start-tag and end-tag
Copyright (C) 2006. Sybase Inc. All rights reserved.
|
|