O'Reilly logo

C# for Java Developers by Adam Freeman, Allen Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required