Get Errors() If errors Text Is Not Nothing Then Throw New Exception(errors Text) End If Return doc End Function As for loading the data from the XML document into a database, it's impossible to say how, precisely, to do that without knowing the schema of the XML document, the schema of the database, the kind of database, etc.I know I have done this before, but it isn't working today, nor can I find anywhere that explains how to do it. Append Line(" error(s) were found while validating the XML document against the XSD:") For Each i As Validation Event Args In _errors builder. Get Errors() If errors Text Is Not Nothing Then Throw New Exception(errors Text) End If Return doc End Function Public Sub Load Xml(xml File Path As String, xsd File Path As String) Dim settings As New Xml Reader Settings() settings. Validation Event Handler) Dim reader As Xml Reader = Xml Reader. Validation Event Handler)) Dim errors Text As String = error Builder. Validation Event Handler, New Validation Event Handler(Address Of error Builder.How do I set the Visual IDE up to notify me of validation failures, and then provide an intellisense list of valid tags and attributes in a given context?What I have tried: Visual Studio still isn't giving up any useful debugging or editing information.Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
I don't know any way of doing xml validation in vb 6.0. NOTE since this is a shared varible you need to be careful you don't try to validate two xml files at the same time. Ben Private Shared error List As List(Of String) = New List(Of String) Private Shared Sub Validation Event Handler(By Val sender As Object, By Val e As Validation Event Args) Select Case e. This article explained about the XML document, XSD schema, and how to validate XML document against XSD schema using Microsoft . I need to validate an XML file (pass the file path/location) against the XSD file (pass the file path/location). Create(xml File Path, settings) ' Read the document... Get Errors() If errors Text Is Not Nothing Then ' Handle the errors End If End Function Public Function Load Validated XDocument(xml File Path As String, xsd File Path As String) As XDocument Dim doc As XDocument = XDocument.Validate(schemas, New Validation Event Handler(Address Of error Builder.Validation Event Handler)) Dim errors Text As String = error Builder.However, to check if an XML document conforms to an XML Schema, the document must be validated against that XML Schema.