Writes a new attribute with the specified local name and value.
Type Reason ArgumentException localName is null or string.Empty. InvalidOperationException The XmlWriter.WriteState is not WriteState.Element.
This method calls the following methods in order to write a complete attribute:
XmlWriter.WriteStartAttribute(null, localName, null)
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0