Working with XML and XML Schemas

Hi, simple question, how do you validate an XML file against a Schema?

I wish to create a list of all XML files in a dierctory which validate against a schema
E.g.

For Each File as FileInfo in New DirectoryInfo(filePath, "*.xml").GetFiles

  If ValidateXML(FileInfo.FilePath) Then lstDisplay.Items.Add(FileInfo.Name)

End For

Sub ValidateXML(filePath as string)
  ???????????
End Sub

Any ideas?

Thanks for you help,
Dan
zomby_dogAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
J_MakConnect With a Mentor Commented:
Have a look at this link:

http://samples.gotdotnet.com/quickstart/howto/doc/Xml/ValidationReadingXML.aspx

It should explain all that you need.
0
All Courses

From novice to tech pro — start learning today.