Defining and Validating XML with Schemas

Whenever you use or manipulate data, you need to have a way of answering certain questions about that data. Is an Invoice ID stored as a text value or a numeric value? Is a phone number limited to 10 digits? For that matter, can a person have more than one phone number? What happens if the person has none?

All these questions have to do with the concepts of data definition and validation. Application developers have historically embedded validation logic in application code. Sophisticated designs can encapsulate validation logic in various ways, but in most cases, the data definition and validation logic aren't accessible to processes outside of your application. This defeats the purpose of XML on a number ...

Get C#® Developer's Guide to ASP.NET, XML, and ADO.NET 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.