NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlTextWriter.WriteXmlDecl (Boolean)

Writes out the XML declaration with the version "1.0" with specified standalone attribute.

[Visual Basic]
Overloads Overrides Public Sub WriteXmlDecl( _
   ByVal standalone As Boolean _
)
[C#]
public override void WriteXmlDecl(
   bool standalone
);
[C++]
public: override void WriteXmlDecl(
   bool standalone
);
[JScript]
public override function WriteXmlDecl(
   standalone : Boolean
);

Parameters

standalone
true writes standalone="yes"; false writes standalone="no".

Exceptions

Exception Type Condition
InvalidOperationException This was not the first write call.

Remarks

A call to one of the WriteXmlDecl methods must be first write call. The encoding attribute is determined by the implementation. For example, the XmlTextWriter constructor takes an Encoding object which determines the value of the encoding attribute.

See Also

XmlTextWriter Class | XmlTextWriter Members | System.NewXml Namespace | XmlTextWriter.WriteXmlDecl Overload List