XML Schemas help you control what elements appear in your XML documents. Similar to Document Type Definitions, they offer distinct advantages over the older syntax. Dan Wellman provides a basic overview, with examples to get you started working on your own.
An Introduction to XML Schemas - Definitions and Elements (Page 4 of 7 )
If you are creating a schema document for an XML document with many elements and child elements, you need to remember to define any simple elements directly after the complex definition that declares them. For example, if the <story> element contained child elements called <body> and <footer>, we would still define the simple element <headline> directly after the <article> complex definition. The simple definitions for <body> and <footer> would then come directly after the complex definition for the <story> element, which would follow the simple definition for <headline>.
In this example however, the <story> element does not have children. Now, to define the datatype of the elements we’ve declared, you just add a type declaration to the simple element definitions, in this case using the built-in datatype ‘string’:
Wandering slightly from the task at hand here, you can constrain an element to having only certain values. If for example the news.xml document had an <author> element, with possible values of only particular names, you would use a restriction base and enumeration's to define the possible values: