Mono Class Library: System.Xml.XmlTextWriter Overview | Members

System.Xml.XmlTextWriter.WriteStartAttribute Method

Writes the start of an attribute with the specified prefix and name, and associates the prefix with the specified namespace URI.

public override void WriteStartAttribute (string prefix, string localName, string namespaceUri)

Parameters

prefix
A string specifying the namespace prefix of the attribute.
localName
A string specifying the local name of the attribute.
namespaceUri
Documentation for this section has not yet been entered.
prefix
Documentation for this section has not yet been entered.

Exceptions

TypeReason
ArgumentExceptionXmlTextWriter.Namespaces is false for the writer, and prefix and ns are not both null or string.Empty.
InvalidOperationExceptionThe XmlTextWriter.WriteState is not one of the following: WriteState.Attribute or WriteState.Element.

Remarks

If any of the input parameters are null or string.Empty, the start attribute is written with that parameter missing.

Note:

This method overrides XmlWriter.WriteStartAttribute(string, string).

Requirements

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