WriteStartDocument()

XmlWriter::WriteStartDocument() method

When overridden in a derived class, writes the XML declaration with the version “1.0”.

virtual void System::Xml::XmlWriter::WriteStartDocument()=0

Exceptions

ExceptionDescription
InvalidOperationExceptionThis is not the first write method called after the constructor.

XmlWriter::WriteStartDocument(bool) method

When overridden in a derived class, writes the XML declaration with the version “1.0” and the standalone attribute.

virtual void System::Xml::XmlWriter::WriteStartDocument(bool standalone)=0

Arguments

ParameterTypeDescription
standaloneboolIf true, it writes “standalone=yes”; if false, it writes “standalone=no”.

Exceptions

ExceptionDescription
InvalidOperationExceptionThis is not the first write method called after the constructor.

See Also