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

Filling DataSet Objects from XML

So far, you've seen how to serialize a DataSet object's schema and contents to XML and the various issues regarding the formatting of the XML. In this section, we'll do the reverse—fill a DataSet from an XML document using the DataSet::ReadXml method.

The ReadXml method is a mirror-image of the WriteXml method to the extent that, much as the WriteXml method takes an XmlWriteMode enumeration value as a parameter, the ReadXml method takes an XmlReadMode enumeration value that specifies how to read XML data and a relational schema into the DataSet. At its most basic level, the ReadXml method is incredibly easy to use. For example, let's say that you had run the DisplayRelationalDataInXml function in order to serialize ...

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