XmlWriter

.NET provides a useful feature to simplify the creation of XML without using DOM. The abstract System.Xml.XmlWriter class defines the functionality for a fast, noncached mechanism to generate streams or files containing well-formed XML; XmlTextWriter provides a concrete implementation of this functionality.

XmlTextWriter

Although the XmlTextWriter class is primarily an implementation of XmlWriter, it also contains a number of noninherited members. We highlight these members as they are discussed.

XmlTextWriter Creation

XmlTextWriter provides three constructors; the constructor arguments identify the destination where the XmlTextWriter should write to as well as the encoding to use. These constructors are summarized in Table 11-14.

Table 11-14. The ...

Get C# for Java Developers 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.