Assembly: System.Xml (in system.xml.dll)
Public MustInherit Class XmlWriter Implements IDisposable
Dim instance As XmlWriter
public abstract class XmlWriter : IDisposable
public ref class XmlWriter abstract : IDisposable
public abstract class XmlWriter implements IDisposable
public abstract class XmlWriter implements IDisposable
Not applicable.
The XmlWriter class supports the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML recommendations.
Note: |
|---|
| Although the Microsoft .NET Framework includes the XmlTextWriter class, which is an implementation of the XmlWriter class, in the 2.0 release, it is recommended that you use the Create method to create new XmlWriter objects. The Create method allows you to specify the features to support on the created XmlWriter object, and it also allows you to take full advantage of the new features introduced in the 2.0 release. |
Note: |
|---|
| When you use the XmlWriter 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 XmlWriter, you will not be able to observe the written elements and attributes in the target document. |
For more information about the XmlWriter class, see Writing XML with the XmlWriter.
Security Considerations
The following items are things to consider when working with the XmlWriter class.
-
Exceptions thrown by the XmlWriter can disclose path information that you do not want bubbled up to the application. Your applications must catch exceptions and process them appropriately.
-
The XmlWriter does not validate any data that is passed to the WriteDocType or WriteRaw methods. You should not pass arbitrary data to these methods.
System.Xml.XmlWriter
System.Xml.XmlDictionaryWriter
System.Xml.XmlTextWriter
System.Xml.Xsl.Runtime.XmlQueryOutput
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1..NET Framework
Supported in: 3.0, 2.0, 1.1, 1.0.NET Compact Framework
Supported in: 2.0, 1.0XNA Framework
Supported in: 1.0Reference
XmlWriter MembersSystem.Xml Namespace
Other Resources
XML Documents and DataSecurity and Your System.Xml Applications
Note: