XML Schema Introduction


XML Schema is an XML-based alternative to DTD.

XML Schema can describe the structure of XML documents.

The XML Schema language can also be referenced as XSD (XML Schema Definition).


Basic Knowledge You Should Have

Before continuing, you should have a basic understanding of the following:

  • HTML / XHTML
  • XML and XML Namespaces
  • A basic understanding of DTD

If you wish to learn these items first, please go to theHome pageto visit these tutorials.


What is XML Schema?

XML Schema is used to define the legal building blocks of an XML document, similar to DTD.

XML Schema:

  • Define the elements that can appear in the document
  • Define the attributes that can appear in the document
  • Define which elements are child elements
  • Define the order of child elements
  • Define the number of child elements
  • Define whether an element is empty or can contain text
  • Define the data types of elements and attributes
  • Define default and fixed values for elements and attributes

XML Schema is the successor to DTD

We believe that XML Schema will soon replace DTD in most web applications.

The reasons are as follows:

  • XML Schema can be extended for future needs
  • XML Schema is more complete and more powerful
  • XML Schema is written in XML
  • XML Schema supports data types
  • XML Schema supports namespaces

XML Schema is a W3C standard

XML Schema became a W3C standard on May 2, 2001.

You can, in ourW3C Tutorialobtain more information about the XML Schema standard.

Other Extensions