Chapter 2. Creating an XML Schema
While XML has become the standard medium for exchanging data, it's the XML schema that defines the structure, content, and semantics of the XML documents. Before you create an XML document that conforms to an XML schema, create the XML schema with the procedure explained in this chapter. Why is it better to start off from an XML schema instead of directly creating the XML document without a schema? Consider a shipping company that sends XML documents containing details on a cargo shipment to a client. If the XML documents are not based on an XML schema, the shipping company might send XML documents containing different sets of elements and attributes. The client won't be able to interpret the XML documents if the XML documents contain different sets of elements and attributes. If the XML documents are based on an XML schema, the client would receive similar XML documents and be able to interpret them. An XML schema makes XML documents understandable to the...