Parsing XML Documents
The System.XML namespace has a variety of classes dedicated to implementing read and write functions for XML documents. This section discusses those classes that are capable of reading and parsing XML documents, tells how they are used, and shows in which situations they are most useful.
The Reader and Writer Base Classes
The System.XML namespace established two very important base classes, XMLReader and XMLWriter (see Figure 10.3). These base classes are inherited from to provide three classes dedicated to reading XML: XmlTextReader, XmlNodeReader, and XmlValidatingReader. There is only one concrete implementation of the XmlWriter base class: XmlTextWriter.
Figure 10.3. The XML reader and writer classes.
The XMLReader
Get Visual Basic® Programmer's Guide to the .NET Framework Class Library 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.