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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access