System.Xml.XmlWriter.WriteStartAttribute Method

When overridden in a derived class, writes the start of an attribute with the specified prefix, local name, and namespace URI.

Syntax

public abstract void WriteStartAttribute (string prefix, string localName, string ns)

Parameters

localName
The local name of the attribute.
ns
The namespace URI for the attribute.
prefix
The namespace prefix of the attribute.
localName
The local name of the attribute.
ns
The namespace URI for the attribute.

Exceptions

TypeReason
InvalidOperationExceptionThe XmlWriter.WriteState is not one of the following:WriteState.Attribute or WriteState.Element.

Remarks

This method enables you to write a value using multiple Write methods.

For the asynchronous version of this method, see XmlWriter.WriteStartAttributeAsync(string, string, string).

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0