System.Xml.XmlWriter.WriteElementString Method

Writes an element with the specified local name, namespace URI, and value.

Syntax

public void WriteElementString (string localName, string ns, string value)

Parameters

value
The value of the element.
localName
The local name of the element.
ns
The namespace URI to associate with the element.
value
The value of the element.

Exceptions

TypeReason
InvalidOperationExceptionThe XmlWriter.WriteState is WriteState.Closed.

Remarks

For the asynchronous version of this method, see XmlWriter.WriteElementStringAsync(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