Chapter 3. XML Data Validation
The base XML reader examined in Chapter 2—the XmlTextReader class—does not enable you to validate the contents of an XML source against a schema. The correctness of XML documents can be measured using two distinct and complementary metrics: the well-formedness of the document and the validity. Well-formedness of the document refers to the overall syntax of the document. Validation applies at a deeper level and involves the semantics of the document, which must be compliant with a user-defined layout.
The XmlTextReader class ensures only that the document being processed is syntactically correct. By design, the XmlTextReader class deliberately avoids making a more advanced analysis of the nodes in the document and ...
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