Schemas

A schema is a definition of the fields that should appear in an XML document. For example, you can use a schema to tell an XML parser that the file must contain only PhoneNumber elements and that those elements must contain LastName, FirstName, and HomePhone fields. You can even ensure that the HomePhone field’s values look like valid phone numbers.

A schema can help ensure that the data your program loads makes sense. Sometimes that lets you reduce the amount of bounds checking and error handling code in your program.

Building and using schemas is a complex subject that is outside the bounds of this book. For more information, see my book Visual Basic.NET and XML (Wiley, 2002, http://www.vb-helper.com/xml.htm). Although working with ...

Get Visual Basic® .NET Database Programming 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.