Sunday, December 17, 2017
 
Code Search
 
Code Bank
 
.NET Applications
XSD Schema Generator
 
.NET/XML Training




 







The XML Validator Class
Description

The XmlTextReader class found in the System.Xml assembly offers a powerful way to traverse XML documents in a forward-only, non-cached manner. However, it cannot be used on its own to validate XML documents against DTDs or XML schemas. This example provides a reusable class named Validator that can be used to validate XML documents using the XmlValidatingReader in the System.Xml namespace. Any errors found during the validation process can optionally be logged to a file. This particular example validates against an XSD schema and will fail because the XML document contains an invalid element named "golfer1."

This sample is from the book XML for ASP.NET Developers by Dan Wahlin (Sams Publishing)


Teaches ASP.NET, XmlTextReader, XmlValidatingReader, and XmlSchema, C#
Requirements .NET 1.0
Example: Click Here
View Source Code: Click Here
Download Code: Click Here

 


.NET, SharePoint and Silverlight Training Solutions
    Online, Onsite and Video Training on .NET and SharePoint technologies available through The Wahlin Group.



© 2007 Wahlin Consulting LLC
XML for ASP.NET Developers in bookstores
Get XML for ASP.NET
Developers