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