Partilhar via


XML Schema Binding Support in the .NET Framework 

The XML Schema definition tool (Xsd.exe), together with the XmlSerializer class, provides bindings between XML Schema definitions and .NET Framework class definitions. Binding support for data types defined in an XML Schema Definition (XSD) document extends to complex types, with the exception of those defined using simple content restriction. The only simple types for which bindings are produced are string-based enumerations.

A description of the translations performed at development time and at run-time is shown in the following table.

Mode

Translations performed

Tools or classes performing the translation

Development time

XML Schema definitions (.xsd files) to classes (source).

Classes (.dll or .exe file) to XML Schema definitions (.xsd files).

Xsd.exe

Run time

XML instance documents (specifying XML schemas) to objects.

Objects to XML instance documents.

XmlSerializer performing deserialization and serialization automatically.

For a table of the XML Schema definition language elements and their binding support, with hyperlinks to summaries of individual elements, see XML Schema Definition Language Elements Binding Support.

For a table of the XML Schema definition language attributes and their binding support, with hyperlinks to associated topics, see Advanced XML ML Schema Definition Language Attributes Binding Support. The same topic also lists hyperlinks for several attributes that require their own advanced topics.

For a table of the XML Schema Instance namespace attributes and their binding support, with hyperlinks to summaries of individual attributes, see XML Schema Instance Namespace Binding Support.

Each element entry also lists the corresponding XML Schema Object Model (SOM) class or property. The SOM provides a programmatic interface to XML schemas and the XML Schema definition language and is also used to validate XML documents. For more information about XML document validation, see Validation of XML with Schemas.

In addition, each of the built-in data types from the XML Schema specification is represented by a native .NET Framework type. For a table of the built-in XML Schema data types and their corresponding .NET Framework types, see Data Type Support between XML Schema (XSD) Types and .NET Framework Types.

For the complete XML Schema specification, see the World Wide Web Consortium (W3C) XML Schema Recommendation at http://www.w3.org/XML/Schema.html.

For general information about the elements and attributes of the XML Schema definition language, see "XML Schema Reference (XSD)" on MSDN.

See Also

Reference

XML Schema Definition Tool (Xsd.exe)
XmlSerializer

Other Resources

Data Type Support between XML Schema (XSD) Types and .NET Framework Types
XML Schema Object Model (SOM)
Validation of XML with Schemas