A Disconnected XML Data Reader

By design, a data reader object works while connected, and so do any XML readers you might build on top of it. However, the .NET Framework provides a class that has the ability to expose a disconnected set of rows—a DataSet object—as XML. The DataSet object is designed as a disconnected object with no relationship to any living instance of a DBMS. The XmlDataDocument class takes a DataSet object and transforms it into an XML DOM object—that is, the XmlDocument class we analyzed in Chapter 5. In a nutshell, the XmlDataDocument class provides a client-side and an XML DOM representation of a disconnected set of rows. Let’s see how.

The XmlDataDocument Class

The XmlDataDocument class inherits from XmlDocument, and ...

Get Applied XML Programming for Microsoft® .NET now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.