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

Serializing XML from a Single DataTable or Multiple Unrelated DataTables

The first thing we'll look at is how to generate XML from a DataSet that contains a single table. In fact, in doing so, you'll quickly see how much attention the .NET development team has paid to integrating ADO.NET and XML. There are two main methods for serializing a DataSet to XML: WriteXml and GetXml. The WriteXml method is generally used when you want to persist the XML representation of a DataSet object's DataTable objects. This method has a number of overloads that allow you to use Stream and Writer object types as well as a file name and a value (XmlWriteMode) indicating the type of schema information you want included with the XML data. Several sections covering ...

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