Chapter 29. Typed DataSets and XSD


IN BRIEF

This chapter will show you how to extend the power of the DataSet with XML-driven schemas written in an XML dialect called XML Schema Definition (XSD). These schemas can define the structure of any data, including things such as keys, relationships, constraints, and much more. Because it is a human-readable dialect, XSD also gives you the ability to annotate schemas and in doing so, to provide documentation about them.

This chapter will show you how to work with XSD, how to integrate XSD into your DataSets, and how to create a strongly typed wrapper around a DataSet based on an XSD schema.

WHAT YOU NEED

REQUIRED SOFTWARE

.NET Framework SDK v1.1

Visual Studio .NET 2003 with C# installed

RECOMMENDED HARDWARE

PC that meets .NET SDK minimum requirements

SKILLS REQUIRED

C# and .NET familiarity

Familiarity with security concepts helpful


TYPED DATASETS AND XSD AT A GLANCE

XML Schema Definition

589

  
 

Introduction to XSD

589

Annotating XML Schemas

593

 

Primitive Data Types in XSD

591

XML Schema Facets

594

 

Derived Data Types

591

Programming XML SchemasThe XmlSchema Class

595

 

Complex Data Types

592

 

Grouping Elements

593

  

Structuring DataSets with Schema

599

  
 

Defining Tables and Columns Using XML Schema

599

Defining DataSet Keys and Constraints with XML Schema

600

Typed DataSets

603

  
 

Creating Typed DataSets in Visual Studio .NET

606

Using Typed DataSets

607

Annotating Typed DataSets

609

 

Building Typed DataSets Using XSD.EXE

607

  

Summary

611

  

Further Reading

611

  




    Visual C#. NET 2003 Unleashed
    Visual C#. NET 2003 Unleashed
    ISBN: 672326760
    EAN: N/A
    Year: 2003
    Pages: 316

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