Writing Schema Information

When you use either the WriteXml or GetXml methods, the resulting XML is the complete data contained within the DataSet, but without the schema information. The schema defines the structure of the data in terms of things like column names and types, primary keys, and any defined relations. You need to generate schema information as either a standalone file or in addition to the XML data if you want to have third-party applications make sense of the DataSet-generated XML data. In this section, we'll look at how to accomplish both these goals.

In order to write just the schema of an XML file, you can use the DataSet::WriteXmlSchema method. Like most methods in the BCL that allow you to persist something, the WriteXmlSchema ...

Get Extending MFC Applications with the .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.