Represents a writer that provides a fast, non-cached, forward-only means of generating streams or files containing XML data.
Assembly: System.Xml (in System.Xml.dll)
The class supports the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML recommendations.
Although the Microsoft .NET Framework includes the XmlTextWriter class, which is an implementation of the class, in the 2.0 release, it is recommended that you use the Create method to create new objects. The Create method allows you to specify the features to support on the created object, and it also allows you to take full advantage of the new features introduced in the 2.0 release.
When you use the methods to output XML, the elements and attributes will not be written until you call the Close method. For example, if you are using the XmlWriter to populate an XmlDocument, until you close the , you will not be able to observe the written elements and attributes in the target document.
For more information about the class, see Writing XML with the XmlWriter.
The following items are things to consider when working with the class.
Exceptions thrown by the can disclose path information that you do not want bubbled up to the application. Your applications must catch exceptions and process them appropriately.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.