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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access