20.3. Reading and Writing XML

At the core of the .NET Framework XML classes are two abstract classes: XmlReader and XmlWriter. These are found in the System.Xml namespace.

XmlReader provides a fast, forward-only, read-only cursor for processing an XML document stream. XmlWriter provides an interface for producing XML document streams. Both classes imply a streaming model that doesn't require an expensive in-memory cache. This makes them both attractive alternatives to the classic DOM approach. Both XmlReader and XmlWriter are abstract base classes and define the functionality that all derived classes must support.

Table 20.1. .NET XML Namespaces
NamespaceDescription
System.XmlContains the core classes required for reading and writing XML documents. ...

Get .NET for Java Developers: Migrating to C# now with O’Reilly online learning.

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