Site Map       
Home
Web Services
XML in .NET
XML Schema
XSLT and XPath
XML Serialization
Database and XML
XML Query
ASP.NET
Contact Info

.NET Notes

Sample Code for this Program can be found at the bottom right hand side of this page.

Please visit our Partner....

 

XML Schema Validator

Validate the document in the XML Document TextBox against the schema in the XML Schema TextBox below by clicking the Validate button. You can use the supplied default XML document and schema or replace them with your own.


                                                

XML Document:                    

                                                

XML Schema:



'XML Schema Validator Sample Code

        Try

            SchemaVal = New XmlValidatingReader(XmlDocument)
            SchemaVal.ValidationType = ValidationType.Schema
            SchemaColl.Add("", SchemaDocument)
            SchemaVal.Schemas.Add(SchemaColl)

            AddHandler SchemaVal.ValidationEventHandler, AddressOf SchemaEventHandle

            While SchemaVal.Read

            End While
            
        Catch XmlException As System.Xml.XmlException
            lblResults.ForeColor = Red
            lblResults.Text = "XML Error: " & XmlException.ToString

        Catch SchemaException As System.Xml.Schema.XmlSchemaException
            lblResults.ForeColor = Red
            lblResults.Text = "Schema Error: " & SchemaException.ToString

        Catch ex As Exception
            lblResults.ForeColor = Red
            lblResults.Text = "General Error: " & ex.ToString

        End Try

XMLME.COM is a Registered ® Service Mark of Seanco Technology.  Copyright © 2008 Seanco Technology, Inc.  All rights reserved.