O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing XML Schemas

Most of this chapter centers on an example document, ch05_06.xml, and its accompanying schema, ch05_07.xsd. (You can use these examples with Internet Explorer's MSXML 4.0; it will validate ch05_06.xml using ch05_07.xsd.) This example is all about recording the books loaned by one person, Doug Glass, and borrowed by another, Britta Regensburg. I record the name and address of the borrower and lender, as well as data about the actual books borrowed, including their titles, publication date, replacement value, and the maximum number of days the book may be loaned for. Here's what ch05_06.xml looks like:

Listing . ch05_06.xml
 <?xml version="1.0"?> <transaction borrowDate="2003-10-15"> <Lender phone="607.555.2222"> <name>Doug ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required