System.Xml.XmlElement.SetAttributeNode Method

Adds the specified System.Xml.XmlAttribute.

Syntax

public virtual XmlAttribute SetAttributeNode (string localName, string namespaceURI)

Parameters

localName
The local name of the attribute.
namespaceURI
The namespace URI of the attribute.

Returns

The XmlAttribute to add.

Remarks

The XmlAttribute does not have any children. Use XmlAttribute.Value to assign a text value to the attribute or use XmlNode.AppendChild(XmlNode) (or a similar method) to add children to the attribute.

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