Sams Teach Yourself ASP.NET in 21 Days, Second Edition By Chris Payne
Table of Contents
Day 11. Using XML in ASP.NET
How does using different types of schemas affect the exercises in today's lesson?
Actually, the examples are affected very little. The different schemas only provide different types of definitions for an XML file, but the XML files themselves don't change. It's like having a Merriam-Webster dictionary versus an Oxford dictionary; both have the same set of words, they just define them differently.
For an example of using the different schemas with validation, check out the following Microsoft URL:
For general information on the three different schemas mentioned today, plus a few other, less-well-known ones, check out this URL:
Which method of accessing XML is better, through ADO.NET or through the .NET Framework XML classes?
The answer to this question is highly subjective. Many people find the objects of ADO.NET easier to manipulate. Others may prefer to manipulate the XML more directly. Luckily, you're not stuck either way. If you start off using one way, you can easily convert to the other. There's no real performance advantage either way.