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

System.Xml.XmlWriter.WriteElementString Method

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

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

Parameters

localName
A string specifying the local name of the element. [Edit]
ns
A string specifying the namespace URI to associate with the element. [Edit]
value
A string specifying the value of the element. [Edit]
value
Documentation for this section has not yet been entered. [Edit]

Exceptions

TypeReason
InvalidOperationExceptionThe XmlWriter.WriteState is WriteState.Closed. [Edit]

Remarks

This method calls the following methods to write a complete element:

XmlWriter.WriteStartElement(string, string)(localName, ns)

XmlWriter.WriteString(string)(value) - this method is not called if value is either null or string.Empty

XmlWriter.WriteEndElement()

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

[Edit]

Requirements

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