18.3. XML Schema Examples

Several examples of code using MSXML are in this chapter, but to build reasonable examples of code, we need some XML to work with. In this case, we need three documents: an XML schema document from which to generate a schema, a document that validates against that schema, and a document that does not validate against it.

In previous chapters, we worked with an XML schema that represents the address of a customer. This schema document, address.xsd, is shown in Listing C.2. The address schema is used in this chapter in the sample code to illustrate how the SOM and MSXML behave. The sample documents used for validation are shown in Listings 18.10 and 18.11 later in the chapter.

Get XML Schema Complete Reference, The 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.