Day 7. XML and the DataSet

for RuBoard

Day 7. XML and the DataSet

Today's discussion will bring us to the end of Week 1 and complete our look at the first of the two major components of ADO.NET, the DataSet . Although you've seen glimpses of how the DataSet is based on XML, today you'll go deeper and explore how XML can be read from, defined, loaded to, and synchronized with a DataSet object using its various methods and properties.

Tip

If you aren't familiar with XML, I recommend you pick up a copy of Sams Teach Yourself XML in 21 Days , Second Edition by Devan Shepherd and take a look at the XML tutorials and FAQs at http://msdn.microsoft.com/xml. Today's lesson assumes a basic understanding of XML.


As mentioned on Day 1, "ADO.NET in Perspective," the widespread adoption of XML for representing and exchanging data over the Web made it imperative that Microsoft also make it easy for developers to use XML in the .NET Framework. You've seen over the last four days that developers using ADO.NET can work with their data in an object-model paradigm using the DataSet object, and even represent it in a strongly typed fashion by relying on inheritance in the .NET Framework. However, at the same time, a DataSet can be fully represented in terms of its structure and data as XML. The joining of the object model approach with XML into a single coherent programming model is one of the key differentiators between .NET and competing frameworks, such as J2EE, for building enterprise applications.

Today you'll learn the following concepts:

  • How to output DataSet contents as XML and to specify the format of the XML

  • How an XSD schema maps to the structure of a DataSet and how the structure can be directly loaded from an XSD document

  • How to load a DataSet from an XML document

  • How to program against a DataSet as if it were XML

for RuBoard


Sams Teach Yourself Ado. Net in 21 Days
Sams Teach Yourself ADO.NET in 21 Days
ISBN: 0672323869
EAN: 2147483647
Year: 2002
Pages: 158
Authors: Dan Fox

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net