Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Sets an attribute on current node to specified value.

void myXml.SetAttribute(attributeName: string, attributeValue: string)

Arguments

string attributeName
Qualified name of attribute.
string attributeValue
Value of attribute.

Remarks

If attribute does not exist, it is created automatically.

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

Example

Usage

Code Block
languagejs
$Xml.SetAttribute('Name', 'John');