XML on TPF: A Short Tutorial Page 5 of 14
Create a Sample XML Schema
Using an XML Schema is another method of defining the acceptable tags for an XML document. An XML Schema is written in XML syntax and typically resides in a file separate from the XML document. The XML document must refer to the specific XML Schema document on which it is written.
This sample XML Schema is less focused on
an actual implementation and more focused on demonstrating the various ways to write XML data:
See how elements, nested elements, and attributes are used. To help understand the differences between an XML Schema and DTD, consider comparing this file with the sample DTD that you saved previously in the tutorial.
Click File --> Save As.
Save the file in C:\xmltut as pnrs.xsd. The default file name may be pnrs.xsd.txt or pnrs.xsd.html. If this is true, ensure that you remove the .txt or .html extension. (The XML document on the next page calls this XML Schema, so the name must match exactly.)
Close the window by clicking the X in the upper-right corner.
Once you have saved the XML document, you are ready to continue.
For More Information
See the TPF XML User's Guide for the following:
A list of books and Web sites for learning about writing XML documents
More information about well-formed and valid XML documents.