John Lokanis Posted August 27, 2008 Author Report Share Posted August 27, 2008 Here is an example of how to read an XML file, extract attributes of elements and also validate it against a schema. I use this to read user-editable configuration files for my project. By using XML with a schema, I can control the format of the file and verify that it adheres to this format when reading it. This allows me to abort application startup with a meaningful error message if someone makes an invalid edit to the configuration file. This is also a good primer on how to read XML files using .NET calls. I hope you find this useful. I also suggest you read some of the tutorials on the net about XML and XSD (schema) to understand how to create and edit your own files. In addition, I recommend XMLSpy by Altova for working with XML and XSD files. -John Download File:post-2411-1219705387.zip Quote Link to comment
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.