Creating Documents from XML Schemas

Now that you have a solid understanding of the XML Schema vocabulary, you're ready to see how documents are created from XML Schemas. Before looking at a specific document, however, you need a complete schema document from which to work. Listing 5.2 contains a complete sports training schema, bits and pieces of which you've seen throughout the chapter.

Listing 5.2. The TrainSchema Sports Training Document Schema
 <?xml version="1.0"?> <Schema name="TrainSchema" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes"> <ElementType name="duration" content="textOnly" dt:type="time"/> <ElementType name="distance" content="textOnly" dt:type="float"/> <ElementType name="location" ...

Get XML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.