Xml.SetAttribute

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

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

Copyright © 2010 - 2023 Emakin. All rights reserved.