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

System.Xml.XmlWriter.WriteAttributeString Method

Writes a new attribute with the specified local name and value.

public void WriteAttributeString (string localName, string value)

Parameters

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

Exceptions

TypeReason
ArgumentExceptionlocalName is null or string.Empty.
InvalidOperationExceptionThe XmlWriter.WriteState is not WriteState.Element.

Remarks

This method calls the following methods in order to write a complete attribute:

XmlWriter.WriteStartAttribute(null, localName, null)

XmlWriter.WriteString(string)(value)

XmlWriter.WriteEndAttribute()

Requirements

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