XML and the .NET Compact Framework DataSet


XML and the .NET Compact Framework DataSet

The DataSet provides a powerful means of manipulating caches of relational data in memory. A DataSet can be populated programmatically, as shown in Chapter 6, "ADO.NET on the .NET Compact Framework." It can also be populated by connecting to a SQL CE or desktop SQL server or by loading XML data that describes the contents of a DataSet into the DataSet . Because the DataSet can save itself as XML and load a DataSet description from XML, it is the only complex class in the .NET Compact Framework that is serializable by using only one or two lines of code.

There are two forms of XML data to and from which the .NET Compact Framework DataSet can be saved. The standard XML format can describe DataSet s with multiple tables and express complex relational attributes of the DataSet . This chapter discusses how to use this format to describe a DataSet with all of the relational data features outlined in Chapter 6. Central to this discussion will be an overview of XML Schema, which describes the structure and layout of the DataSet .

The other format is the XML DiffGram. Support for this format is necessary to enable Web services, but the .NET Compact Framework DataSet supports the DiffGram format only to the extent as to allow a DataSet to be used as a parameter or return value in a Web service.

The techniques for loading and saving a DataSet to XML is nearly the same, regardless of the format use. Thus, we begin by thoroughly discussing the variety of means by which to load and save DataSet s to XML.



Microsoft.NET Compact Framework Kick Start
Microsoft .NET Compact Framework Kick Start
ISBN: 0672325705
EAN: 2147483647
Year: 2003
Pages: 206

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