Using XML in a DataSetÂ
With ADO.NET you can fill a DataSet from an XML stream or document. You can use the XML stream or document to supply to the DataSet either data, schema information, or both. The information supplied from the XML stream or document can be combined with existing data or schema information already present in the DataSet.
ADO.NET also allows you to create an XML representation of a DataSet, with or without its schema, in order to transport the DataSet across HTTP for use by another application or XML-enabled platform. In an XML representation of a DataSet, the data is written in XML and the schema, if it is included inline in the representation, is written using the XML Schema definition language (XSD). XML and XML Schema provide a convenient format for transferring the contents of a DataSet to and from remote clients.
In This Section
- DiffGrams
Provides details on the DiffGram, an XML format used to read and write the contents of a DataSet.
- Loading a DataSet from XML
Discusses different options to consider when loading the contents of a DataSet from an XML document.
- Writing a DataSet as XML Data
Discusses how to generate the contents of a DataSet as XML data, and the different XML format options you can use.
- Loading DataSet Schema Information from XML
Discusses the DataSet methods used to load the schema of a DataSet from XML.
- Writing DataSet Schema Information as XML Schema (XSD)
Discusses the uses for an XML Schema and how to generate one from a DataSet.
- Synchronizing a DataSet with an XmlDataDocument
Discusses the capability available in the .NET Framework of synchronous access to both relational and hierarchical views of a single set of data, and shows how to create a synchronous relationship between a DataSet and an XmlDataDocument.
- Nested DataRelations
Discusses the importance of nested DataRelation objects when representing the contents of a DataSet as XML data, and describes how to create them.
- Generating DataSet Relational Structure from XML Schema (XSD)
Describes the relational structure, or schema, of a DataSet that is created from XML Schema.
- Inferring DataSet Relational Structure from XML
Describes the resulting relational structure, or schema, of a DataSet that is created when inferred from XML elements.
Related Sections
- Overview of ADO.NET
Describes the ADO.NET architecture and components, and how to use them to access existing data sources as well as to manage application data.