O'Reilly logo

Extending MFC Applications with the .NET Framework by Nishant Sivakumar, Tom Archer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required