Skip to content

XmlNode.SetAttribute

Overview

void XmlNode.SetAttribute ( attributeName, [ value ] )
Sets an attribute on current node to specified value.

Arguments

String attributeName

Qualified name of attribute.

String value

Value of attribute.

Remarks

If attribute is not exist created automatically.

This method uses empty namespace for attribute names. If you need to set attribute with a namespace please refer to SetAttributeNS method.

Examples

Usage

$Xml.SetAttribute('Name', 'John');

See Also