8.11. Implementing XmlReader

Because I illustrate how to write data providers with an example of a simple provider of file system information, I'll illustrate XmlReader using the same data source. The Infoset provider based on XmlReader appears in its entirety on the book's Web site. XML documents make great use of hierarchies, however, and therefore the file system reader will be able to recurse into child levels of the file system hierarchy. I could have exposed this functionality in a data provider using IDataReader.GetData, but with data providers, it is less important in terms of the overall model.

XmlReader is a complex class, containing functionality in a few discrete areas. Some of the functionality is related to the division of data ...

Get Essential ADO.NET 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.